Solved

Parameters

Posted on 2002-06-22
1
173 Views
Last Modified: 2010-05-02
Hi,
Please is there any one can tell me how can i define a command line parameters to an EXE and send a value to it from the command line ....

thanx alot
Loay
0
Comment
Question by:loay
1 Comment
 
LVL 33

Accepted Solution

by:
hongjun earned 50 total points
Comment Utility
In your coding, add this.
Private Sub Form_Load()
   MsgBox Command
End Sub

You can of course use the Command variable anywhere in the program.


Run the exe like this assuming your exe is on the desktop
c:\windows\desktop\Project1.exe hello world

"hello world" will be echoed.


Below will show you roughly how to use the parameters.
Private Sub Form_Load()
   Dim aryParams()
   aryParams = Split(Command()," ")
   'will give
   'aryParams(0) = "hello"
   'aryParams(1) = "world"
End Sub

hongjun
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now