Try the following:
Form Declarations:
Declare Function GetDesktopWindow Lib "USER" () As Integer
Declare Function ShellExecuteBynum Lib "SHELL" Alias "ShellExecute" (ByVal hwnd%, ByVal lpszOpp&, ByVal lpszFile$, ByVal lpszParamss&, ByVal lpszDir$, ByVal fsShowCmd%) As Integer
Const SW_SHOWNORMAL = 1
Form Subs:
Sub UpdateHelp_Click ()
Dim r As Integer
'---- Display DSS Web Site
Temp$ = "
r = StartFile(Temp$)
If r < 33 Then
ErrorMessage1 r, "Benefits Calculator Web Site"
End If
'---- End Display DSS Web Site
End Sub
Function StartFile (DocName As String) As Integer
'---- Display Internet Page
Dim Scr_hDC As Integer
Scr_hDC = GetDesktopWindow()
StartFile = ShellExecuteBynum(Scr_hDC, 0&, DocName, 0&, Left$(APP.Path, 1) & ":\", SW_SHOWNORMAL)
'---- End Internet Page
End Function
Sub ErrorMessage1 (ErrorNumber%, WebSite$)
'---- Display Error Message
Temp$ = "error occurred when Windows was attempting to access the " & WebSite$ & " Website."
Select Case ErrorNumber%
Case 0
Msg$ = "Insufficient system memory or corrupt program file " & Temp$
Case 2
Msg$ = "File not found " & Temp$
Case 3
Msg$ = "Invalid Path " & Temp$
Case 5
Msg$ = "Sharing or protection error " & Temp$
Case 6
Msg$ = "Separate data segments are required for each task " & Temp$
Case 8
Msg$ = "Insufficient memory to run the program " & Temp$
Case 10
Msg$ = "Incorrect Windows version " & Temp$
Case 11
Msg$ = "Invalid program file " & Temp$
Case 12
Msg$ = "Program file requires a different operating system " & Temp$
Case 13
Msg$ = "Program requires MS-DOS 4.0 " & Temp$
Case 14
Msg$ = "Unknown program file type " & Temp$
Case 15
Msg$ = "Windows program does not suppport protected memory mode " & Temp$
Case 16
Msg$ = "Invalid use of data segments when loading a second instance of a program " & Temp$
Case 19
Msg$ = "Attempt to run a compressed program file " & Temp$
Case 20
Msg$ = "Invalid dynamic link library " & Temp$
Case 21
Msg$ = "Program requires Windows 32-bit extensions " & Temp$
Case Else
Msg$ = "An unknown " & Temp$
End Select
Title$ = "CANNOT ACCESS INTERNET"
MsgBox Msg$ & Chr$(13) & Chr$(13) & Str$(ErrorNumber%), 16, Title$
'---- End Display Error Message
End Sub