We just installed a Batch job queue system which among other things can act one way or the other based on an app's return code. Return codes are common in the mainframe world, but how do I issue a return code from inside a VB app?
To have a VB program issue a return value upon exit, first declare the following API
Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Then in the form unload of the main form
Private Sub Form_Unload(Cancel As Integer)
ExitProcess CLng(<your return value>)
End Sub Good Luck
-------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.