Night Blade
July 18th, 2001, 02:43 PM
How do you make a browser window open to a specified URL when you click a command button?
|
Click to See Complete Forum and Search --> : Browser Night Blade July 18th, 2001, 02:43 PM How do you make a browser window open to a specified URL when you click a command button? ant July 18th, 2001, 04:29 PM Do you mean the browser active X control? --Ant -------------------------------------------------- check out my newest freeware E-mail me at: christopherfolger@hotmail.com for the address michi July 18th, 2001, 04:52 PM 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 cksiow July 18th, 2001, 07:08 PM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |