how can I activate a hyperlink address from the vbOKOnly button

P

pete

I have created the message box and when the user click the OK button I want a
hyperlink to activate. Anyone know the code for this after the vbOKOnly
Thanks
 
F

fredg

I have created the message box and when the user click the OK button I want a
hyperlink to activate. Anyone know the code for this after the vbOKOnly
Thanks

If the site address is fixed and known:
Application.FollowHyperlink "http://www.thesite.com"

If the site address is a variable string value displayed in a control
on the form:
Application.FollowHyperlink Me![ControlName]
 
M

Mark Andrews

I use this code:
Public Sub OpenWebPage(url As String)

Dim browser As Variant

Set browser = CreateObject("InternetExplorer.Application")
browser.Navigate (url)
browser.StatusBar = False
browser.Toolbar = False
browser.Visible = True
browser.Resizable = True
browser.AddressBar = True


End Sub

I found application.followhyperlink sometimes locks up the computer.
Most of the time it works fine.

HTH,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

fredg said:
I have created the message box and when the user click the OK button I
want a
hyperlink to activate. Anyone know the code for this after the vbOKOnly
Thanks

If the site address is fixed and known:
Application.FollowHyperlink "http://www.thesite.com"

If the site address is a variable string value displayed in a control
on the form:
Application.FollowHyperlink Me![ControlName]
 
P

pete

Thanks to you both. Very helpful should impress my boss with the new database
I'm building.
Many thanks indeed
pete
 

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