Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21090

Run-time error 5

$
0
0
Hi,

The easy part of this question is, I have an old VB6 program that has worked well over the years. I made a few changes to the program and it works well while running in the IDE. When I compile it I get the run-time error 5 on startup.

Now the hard part, by placing Stop statements into the program I found the error was not produced when I place the Stop statement where shown, and the program appears to have actually stopped running:

Code:

Private Sub Form_Activate()

    Active = True

    If EngBinary = False Then
        Stop
        optFix(notation).SetFocus
        'Stop
    End If

With the 2 Stop statements comments (') reversed the error does occur. And there's a lot more code that comes after that appears to have run before the program actually stops.

Any clues?

Viewing all articles
Browse latest Browse all 21090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>