Link to home
Start Free TrialLog in
Avatar of rfb1
rfb1

asked on

How to make an button launch a URL

I only have 77 points left but they're yours if you can tell me how to program a command button to launch a URL.
Avatar of KangaRoo
KangaRoo

In VBA there is the FollowHyperLink method
ASKER CERTIFIED SOLUTION
Avatar of Radler
Radler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rfb1

ASKER

Radler:
this errors..what is wrong?

Private Sub Command1_Click()
ShellExecute(GetDesktopWindow, "open", "C:\awork\control.htm", NULL, NULL, SW_SHOWNORMAL)
End Sub
Avatar of rfb1

ASKER

Radler:
this errors..what is wrong?

Private Sub Command1_Click()
ShellExecute(GetDesktopWindow, "open", "C:\awork\control.htm", NULL, NULL, SW_SHOWNORMAL)
End Sub
You can also drop the WebBrowser control on your form and code:

WebBrowser1.Navigate URL

M

Avatar of rfb1

ASKER

MARK2150...

I am running VB6 but don't see a web browser control.

You have to load it in. <Ctrl T>, look for Microsoft Internet Controls. It'll add two icons to the toolbar. Grab the little Globe icon and drop it on the system. It's a dependency of IE4. If you don't have IE4 installed you won't have the icon. My web page has a browser based on this control:

www.cyberchute.com/rvbus/madmark


M