Sometimes a runtime error only manifests itself after an EXE ismade and not in debug mode. This can be hard to track down, evenwith message-box statements. Use the code profiler add-in to findthe offending line of code. Following these steps should leadto your error:
- First back up your code.
- Select the code profiler add-in.
- Select the source code file (or all source code files).
- Select the Line Hit Count option.
- Select the Add Profiler Code button.
- Compile the code into an EXE.
- Run the code to the error.
- Go back to the code profiler and select View Results fromthe File menu.
Look for the last line that was executed in the offending module.You may have to trace through your code in debug mode at the sametime that you look for the last line executed in the profiler.