Click to See Complete Forum and Search --> : how do i specify IE's default web site into this sub......
tim900000
September 28th, 2001, 06:48 PM
Hi,
At the moment, ie is opening with the site in the code below. What code should I use to get ie to open on the site which is the default home page?
Thanks for any help...
Private Sub mnuBrowser_Click()
Dim lngReturn As Long
lngReturn = Shell("start http://www.msn.co.uk", vbNormalFocus)
End Sub
Andrew R.
October 5th, 2001, 10:53 PM
1) find out what is the dafault browser on the user's machine. It's in Registry here: "HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command"
or here: "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shell\opennew\command"
2) then just run it
For example on my machine Registry contains this text "C:\Program Files\Internet Explorer\iexplore.exe". So, I do:
lngReturn = Shell("C:\Program Files\Internet Explorer\iexplore.exe", vbNormalFocus)
midnightservice
October 5th, 2001, 11:32 PM
or you can do this
lngReturn = Shell("C:\Program Files\Internet Explorer\iexplore.exe" http://www.msn.co.uk, vbNormalFocus)
always works for me
midnightservice
midnightservice
October 5th, 2001, 11:38 PM
sorry i missed typed my earlier string here is the correct string
lnreturn = Shell("c:\program files\internet explorer\iexplore.exe http://www.msn.co.uk", vbNormalFocus)
midnightservice
Andrew R.
October 6th, 2001, 12:43 PM
I think you've missed the problem which is: "Run default browser without providing any URL."
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.