Capturing Input from a Input Box

drezner7
drezner7 used Ask the Experts™
on
I would like to collect input from a user and place the value in the name of the output file. Here is the input box code:

i = inputBox("Please enter UID Number?") = 5467

I want to take the value of that question and add it to the name of the outputfile... For example:

Const sXML = "C:\XML_Testing_Room\GrabbingI_Input_5467_.xml"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
That would be:

    i = inputBox("Please enter UID Number?")
    sXML = "C:\XML_Testing_Room\GrabbingI_Input_" & i & "_.xml"

Author

Commented:
Here is what I added based on your recommendation and I am getting an ERROR:

"C:\XML_Testing_Room\FINAL_"& i &"_55998_-_001.xml"

Error: Expected literal constand
Code:800A0415
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
Can you show the whole line of code?

I don't believe you can keep the "const" declaration on it which is why I removed it.

Author

Commented:
You are absolutley correct, I removed the Const and work like a charm... That is so awesome! I have another question on the Input Box do I place it here or create a new question?

Author

Commented:
Fantastic ! Than you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial