ok, i want to get a webpage to open up in the default browser when you click a button. i found this code from the codebank.
VB Code:
Private 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 Private Sub OpenURL(strURL As String) ShellExecute Me.hWnd, "open", strURL, vbNullString, "C:\", ByVal 1& ' Change the last perameter to 0& if you do not whant to show the window. End Sub
i cant get this to work. and im wondering if anyone could lend a hand?




Reply With Quote