Website

D

dale

Is there a way to make a button open up a browser and go to a website
specified in code?
 
B

BruceM

If you just want to go to the same website every time you could add the web
address to the button's Hyperlink Address property. To set it in code, see
Help for information about HyperlinkAddress.
 
D

Dirk Goldgar

BruceM said:
If you just want to go to the same website every time you could add
the web address to the button's Hyperlink Address property. To set
it in code, see Help for information about HyperlinkAddress.

And if you want to go to a website that changes and is known only at run
time, you can use the Application.FollowHyperlink method; e.g.,

Application.FollowHyperlink strURL
 
D

Dale

Bruce,

It will not always be the same website. It will be based on information that
is on the form.

Dale
 
D

Dirk Goldgar

Dale said:
Dirk

Here is the code I tried and it did not work. Any suggestions?

Application.FollowHyperlink
"www.usef.org/cs/results.php?"+me.ahsa.value+"&type=I", true

Try specifying the "http://" prefix:

Application.FollowHyperlink _
"http://www.usef.org/cs/results.php?"+me.ahsa.value+"&type=I"

It looks to me like your second argument, "true", is in the wrong place.
The second argument should be a subaddress. If you mean that to be the
NewWindow argument, you need an extra comma:

Application.FollowHyperlink _
"http://www.usef.org/cs/results.php?" _
+ me.ahsa.value + "&type=I", , _
True
 
Top