|
-
April 20th, 2005, 10:12 AM
#1
Passing in Command Line Arguments [VB6]
My VB6 application is meant as a command line application (to be run from the command prompt).
The way I implemented that was to create a blank/invisible form (frmMain) and put all my code in there (this should work when run from the command line right?)
What I need to implement is the ability for the user to pass in an argument when running the application from the command line.
Specifically, currently my application gets Today's date [String sDate], I need this to be more flexible, meaning I want the user to be able to select the date by passing it in.
So, for example, if my application is called [app.exe] and from the command prompt the user runs "app.exe" [with no arguments] my [sDate] will work as it does now.
HOWEVER if the user did something like "app.exe 03202005" then I want sDate to be 03202005 (forget Formatting Date issues, assume it is a string).
How can I accomplish this?
[Also, if you know, how can I make my VB6 application into an EXE?]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|