Visual Basic Debugging Considerations

This section describes how to debug the Fortran code in the DLL being called by Visual Basic. It is not intended to describe how to debug the Visual Basic code itself. This section describes the following:

Debugging the Fortran DLL

In Visual Basic, create an executable of your project. Use the pull down menu item File-Make myproject.exe. Note where the executable was created.

In the Visual Fortran development environment:

  1. In the Project menu, click Settings
  2. Click the Debug tab
  3. In the box labelled "Executable for debug session," enter the full path and filename of the executable you created above.

You can now use the full power of the visual development environment debugger to debug your DLL.

If you are using VBA within Microsoft Excel, the steps are similar for debugging your DLL. Enter the full path and filename for Excel into the box labelled "Executable for debug session". Optionally, you can enter the name of the worksheet into the box labeled "Program arguments:". You can now use the visual development environment to debug your DLL.

For a sample Fortran debugging session, see Debugging the Squares Example Program.

Visual Basic Error 53: File not found: yy.dll

If you get the error message "File not found: yy.dll" when you run the Visual Basic application, check the following:

Visual Basic Error 453: Can't find DLL entry point xx in yy.dll

If you get the error message "Can't find DLL entry point xx in yy.dll," check the following:

For an example of calling a Fortran DLL from Visual Basic, see Examples of Fortran/Visual Basic Programs.