Solved

100 pts for urgent question

Posted on 2002-03-05
1
161 Views
Last Modified: 2010-05-02
hello, i'm developing a app called myApp.exe, how to get the arguments of this app? I mean if someone type :

myApp.exe Test1 Test2

I can access the arguments (Test1 and Test2), now how to recognize the arguments in my program?
0
Comment
Question by:wuyinzhi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
Ark earned 100 total points
ID: 6841172
Private Sub Form_Load()
   Dim sCmd As String,sOut As String
   Dim arrArgs
   sCmd = Command$
   arrArgs = Split(sCmd," ")
   sOut = "Your arguments are:" & vbCrLf
   For i = 0 to Ubound(arrArgs)
       sOut = sOut & CStr(i+1) & " - " & arrArgs(i) & vbCrLf
   Next i
   MsgBox sOut
End Sub

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 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