0

What I am trying to accomplish is to have a popup that asks a user for a numeric value, when that value gets entered, it is then placed in a certain position in a command-line and then run.

I am using this for is for an accounting software. If you need to delete a transaction from a database, you find a job ID in a report, then you run a command and enter the job id at the end of a certain string and it wipes out the transactions in the DB.

I am just trying to simplify the method....any help?

0

1 Answer 1

1

I would suggest reading this documentation on InputBoxes in vbscript.

You can set a variable to equal the input box, eg. strInput = InputBox("prompt") then pass the variable strInput to the dos command.

You might also read about running a command from vbscript here.

So your code would be, roughly,

strInput = InputBox("prompt")
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "program.exe /argument=" & strInput
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.