XLL+ Class Library

Testing & Debugging in Visual Studio 6

Note: These instructions are for users of Microsoft Visual Studio 6. For instructions on debugging a project under Microsoft Visual Studio .NET or Visual Studio 2005, click here.

Open the add-in

Once Excel has started, open the add-in library using the File - Open menu option (or Ctrl+O).

In the File Open dialog, navigate to the Debug sub-directory of your project directory and open Tutorial1.xll, as shown below.

Use the add-in function

In Excel, put a formula into a spreadsheet, as shown below.

Set a break-point

Activate DevStudio - you do not need to close Excel to do so. Select Tutorial1.cpp and use the F9 key (or the right-mouse menu) to add a break-point to the add-in function, as shown below.

Force a recalculation

Force a formula cell to recalculate. The easiest way to this is to go to the cell you want to recalculate (in this case, cell B1) and click on the F2 key then the Enter key. (Alternatively, you can simply change the value in cell A1.)

After you press Enter, Excel will call the add-in function and the DevStudio debugger will break at the break-point. You can step through the lines of the function (with F10 and F11) or continue (with F5).

Close Excel and return to DevStudio. We are now ready to add another add-in function.

Next: Building your add-in library in Visual Studio .NET or Visual Studio 2005 >>