how can I activate a hyperlink address from the vbOKOnly button

  • Thread starter Thread starter pete
  • Start date Start date
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
 
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]
 
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]
 
Thanks to you both. Very helpful should impress my boss with the new database
I'm building.
Many thanks indeed
pete
 
Back
Top