I need to run VB exe. The use wants to put it in a schedules where the input and output file will be passed as a parameter on the DOS line with run statement.
The processing of the file is in a click event. Now because the input/output file is passed on the command line, I would like to process the file without the user interface. In which event the code should be to process the input file and create the output file??????/
If it is running in Batch mode, you can not rely on any click events. Put the code in a mod and have the program start with sub main rather than a form at startup. From the main, call the code that will process your data. - Jeff Marler B-)
To add to Jeff's:
I have some automated programs like this, and they are scheduled to run once a day(whatever). However, sometimes they need to be run again for some reason (like a server/network was down, newer data has been received, etc), and the App needs to be run manually(w/GUI). So...
Sub Main()
if Command <> "" Then
Dim strInFile As String
Dim strOutFile As String
strInFile = Left(Command, InStr(Command, " " - 1)
strOutFile = Mid(Command, InStr(Command, " " + 1)
DoProcessing(strInFile, strOutFile)
Else
frmMainForm.Show
End If
End Sub
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.