variable for a web address in a Shell statement

L

Larry

Basic problem, but I can't get the hang of it.

In the code below, I want to replace the web address with a variable
called sAddress to open a web page.

Shell ("C:\Program Files\Internet Explorer\IEXPLORE.EXE
www.washingtonpost.com"), _
vbNormalFocus

I've tried all kinds of variations similar to the below code using &,
but I can't find the way that works.

Shell ("C:\Program Files\Internet Explorer\IEXPLORE.EXE sAddress"), _
vbNormalFocus
 
J

Jezebel

pAddress = "C:\Program Files\Internet Explorer\IEXPLORE.EXE " & sAddress
Shell pAddress, vbNormalFocus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top