Option ExplicitPrivate 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 Command1_Click() ShellExecute 0, "open", "http://www.applevb.com", vbNullString, vbNullString, 5 End Sub
还有另外的方法:Private Sub Command1_Click() Dim ret ret = Shell("explorer http://www.applevb.com") End Sub
"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 Command1_Click()
ShellExecute 0, "open", "http://www.applevb.com", vbNullString, vbNullString, 5
End Sub
还有另外的方法:Private Sub Command1_Click()
Dim ret
ret = Shell("explorer http://www.applevb.com")
End Sub