Solved

DDE

Posted on 2001-06-18
4
210 Views
Last Modified: 2010-05-02
I need to start a vb app from a command prompt and send a single parameter to it.
For example, the user will type:

c:\myApplication.exe someParameter

and then my program should be started and read the parameter and I will manipulate it from there.

I think that DDE will do this, but I'm not sure how.  I've spent a few hours researching and I need help from anyone who knows about this.

Armando
0
Comment
Question by:Barraza
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
gbaren earned 200 total points
ID: 6203619
Sub Main()
dim sCommandLine as string

   sCommandLine = Command$

End Sub
0
 
LVL 1

Author Comment

by:Barraza
ID: 6203634
Thanks a billion!  Actually, thanks 200 points!
:)
Armando
0
 
LVL 5

Expert Comment

by:gbaren
ID: 6203635
The Command built-in function returns the argument portion of the command line. In your example above, it will return "someParameter".

 
0
 
LVL 5

Expert Comment

by:gbaren
ID: 6203637
You're quite welcome :)
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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