Dim IE As Object Private Sub Command1_Click() Set IE = CreateObject("InternetExplorer.Application") On Error Resume Next IE.Navigate "www.csdn.net" End Sub
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 LongPrivate Sub mnuWWW_Click() ShellExecute Me.hWnd, vbNullString, "www.163.com", vbNullString, vbNullString, 1 End Sub
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 Command1_Click()
Set IE = CreateObject("InternetExplorer.Application")
On Error Resume Next
IE.Navigate "www.csdn.net"
End Sub
ShellExecute Me.hWnd, vbNullString, "www.163.com", vbNullString, vbNullString, 1
End Sub
ShellExecute 0, "", "网址", "", "", 5