Solved

Setting Parameters

Posted on 2000-04-19
1
124 Views
Last Modified: 2011-09-20
Hello all, This should be an easy one!

I want to set parameter for an EXE. The DOS command line would look like this:

a:\Testexe -Sdx a:\dump.txt c:\1.txt c:\2.txt

How do i get the parameters 'c:\1.txt' & 'c:\2.txt' to come from 2 text boxes on the form. I want the user to be able to type in a path in txtbox1 and txtbox2 and that path be placed in the parameters for Testexe.

Heres the code i currently have:

wd = Shell("a:\testexe -Sdx a:\d.txt c:\1\1.txt c:\2\1.txt", vbNormalFocus)

Can you help?
0
Comment
Question by:hirschhouse
1 Comment
 
LVL 14

Accepted Solution

by:
wsh2 earned 35 total points
ID: 2732343
dim strCommand as String

strCommand = "a:\testexe -Sdx a:\d.txt " _
   & text1.text & "1.txt " _
   & text2.text & "2.txt "
wd = Shell(strCommand, vbNormalFocus)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

867 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

22 Experts available now in Live!

Get 1:1 Help Now