Opening a browser to your homepage submitted by Dan Newsome D&D Information Professionals, newsomed@earthlink.net You can use code like the following to open a browser to your homepage. Modify filenames, paths, and URLs as necessary to match the values on your system. Dim FileName As String, Dummy As String Dim BrowserExec As String * 255 Dim RetVal As Long Dim FileNumber As Integer Const SW_SHOWNORMAL = 1 ×¢ÊÍ£º Restores Window if Minimized or Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" _ (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As _ String) As Long ×¢ÊÍ£º --------- BrowserExec = Space(255) FileName = "C:\temphtm.HTM" FileNumber = FreeFile() ×¢ÊÍ£º Get unused file number Open FileName For Output As #FileNumber ×¢ÊÍ£º Create temp HTML file Write #FileNumber, " <\HTML>" ×¢ÊÍ£º Output text Close #FileNumber ×¢ÊÍ£º Close file ×¢ÊÍ£º Then find the application associated with it. RetVal = FindExecutable(FileName, Dummy, BrowserExec) BrowserExec = Trim$(BrowserExec) ×¢ÊÍ£º If an application is found, launch it! If RetVal <= 32 Or IsEmpty(BrowserExec) Then ×¢ÊÍ£º Error Msgbox "Could not find a browser" Else RetVal = ShellExecute(frmMain.hwnd, "open", BrowserExec, _ "www.myurl.com", Dummy, SW_SHOWNORMAL) If RetVal <= 32 Then ×¢ÊÍ£º Error Msgbox "Web Page not Opened" End If End If Kill FileName ×¢ÊÍ£º delete temp HTML file