Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a shell command with a twist

Status
Not open for further replies.

dedo8816

Programmer
Oct 25, 2006
94
0
0
GB
Hi,

Im trying to make a shell command open the internet explorer (no problem), i want it to go to fedex's website (again no problem)

Shell "C:\Program Files\Internet Explorer\iexplore.exe" & " & txttrackingnum.Text

I want it to open the tracking page and go to the tracking number held in a text box of the form (this is the twist), i know im doing this wrong, can anyone tell me how?

Thanks
D
 
I don't see any major problem in the code except that you need to separate EXE path and URL with a space.

[tt]...\iexplore.exe[highlight] [/highlight]" & "[ignore][/ignore]...[/tt]

Also, instead of running IE with a hardcoded path, I would suggest you to use the OpenDocument function (see thread222-1469071) which will launch the specified URL in your default browser.

[tt]OpenDocument "[ignore][/ignore]" & txttrackingnum.Text[/tt]

You can also use this function to execute any document file in its associated application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top