Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting Internet Explorer

Status
Not open for further replies.

Thead7

Programmer
Feb 2, 2002
7
GB
I am trying to start Internet explorer from one of my programs and set the web page it connect to.
I can't seem to find any help for this, I have written code to start Outlook with a new blank email but not to start IE.
Any relevant web pages or comments would be much appreciated.
 
Hi,

Here is a sub that launches all file that have program associated with them (like .htm files, when you have a browser installed).

----------------------------------------------------------
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" _
(ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long

Public Function LaunchFile(TheFile As String)
Dim retval, Dummy As String, prog As String
Dim StrTmp As String


' Then find the application associated with it.
prog = Space(255)
retval = FindExecutable(TheFile, Dummy, prog)
' If an application is found, launch it!
If retval > 32 Then
StrTmp = Left$(prog, InStr(1, prog, ".exe") + 3) & " " & TheFile
LaunchFile = Shell(StrTmp, vbNormalFocus)
Else
LaunchFile = retval
End If
End Function
----------------------------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
hi,

its easy mate all you do is click on the "e" icon on your desktop or your other internet connection button.

glad i could have been of help.

thanks mate
 
put a label on Your form and name it lblGo

Private Sub lblGo_Click()
On Error Resume Next
Me.lblGo.HyperlinkAddress = " & Me.lblGo.Caption
Me.lblGo.Hyperlink.Follow
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top