VB Code to populate data in a URL

Alwayslearningmore
Alwayslearningmore used Ask the Experts™
on
Trying to create a VB script that will prompt a user to put input data, this data then will populate into parts of a url so that it goes to the correct page.

Managed to get a prompt box for user data to appear but i can get this data to populate in the middle of a URL. i'm sure the code is wrong and needs to be change or is there an easy way around this?
Code below, basically where the strAnswer is in the url i need the data to populate.  Any suggestions would be nice :)

strAnswer = InputBox _
        ("Enter your Data here","This is your Case Number")

Set objExplorer = CreateObject _
    ("InternetExplorer.Application")

strURL = "http://MYIPADDRESS/servlet?key=number=&strAnswer&outgoing_uri=SOMETHINGAWESOME"
objExplorer.Navigate strURL
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 800
objExplorer.Visible = 1
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
you need to tell us what querystring is for strAnswer?

quick try to change:

strURL = "http://MYIPADDRESS/servlet?key=number=&strAnswer&outgoing_uri=SOMETHINGAWESOME"

Open in new window


to:

strURL = "http://MYIPADDRESS/servlet?key=number&Answer=" & strAnswer & "&outgoing_uri=SOMETHINGAWESOME"

Author

Commented:
Thanks, that looks like it works,
I just needed the user's input to end up where StrAnswer was in the URL which was a phone number :)

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