|
-
July 18th, 2001, 02:43 PM
#1
Browser
How do you make a browser window open to a specified URL when you click a command button?
-
July 18th, 2001, 04:29 PM
#2
Re: Browser
Do you mean the browser active X control?
--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: [email protected]
for the address
-
July 18th, 2001, 04:52 PM
#3
Re: Browser
Add a WebBrowser control on your form first. If you can not find the control, add "Microsoft Internet Controls" component into your toolbox.
Then add one text box, one command button on your form.
=========
Private Sub Command1_Click()
On Error Resume Next 'Don't stop execution, continue on next line
WebBrowser1.Navigate Text1.Text
If Err.Number <> 0 Then MsgBox "Error :" & Err.Description 'Display error message
End Sub
========
Regards,
Michi
MCSE, MCDBA
-
July 18th, 2001, 07:08 PM
#4
Re: Browser
put this in the button click event handler, where URL is the URL string.
ShellExecute(me.hWnd, "Open", URL, "", App.Path, 1)
HTH
cksiow
http://vblib.virtualave.net - share our codes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|