• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

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.
0
rfb1
Asked:
rfb1
1 Solution
 
KangaRooCommented:
In VBA there is the FollowHyperLink method
0
 
RadlerCommented:
use:
ShellExecute(GetDesktopWindow, "open", path_to_url, NULL, NULL, SW_SHOWNORMAL).

0
 
rfb1Author Commented:
Radler:
this errors..what is wrong?

Private Sub Command1_Click()
ShellExecute(GetDesktopWindow, "open", "C:\awork\control.htm", NULL, NULL, SW_SHOWNORMAL)
End Sub
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rfb1Author Commented:
Radler:
this errors..what is wrong?

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

WebBrowser1.Navigate URL

M

0
 
rfb1Author Commented:
MARK2150...

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

0
 
mark2150Commented:
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

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now