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:
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:
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:
These files are DFORRT.DLL, DFORMD.DLL, and MSVCRT.DLL on the Visual Fortran CD-ROM. They can be freely distributed with your application (see Compaq Visual Fortran Installing and Getting Started).
Carefully check the path and file name in the Visual Basic Declare
statement.
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.