可以用API ShellExecute 可以这样: Private Sub OpenHomeSite() Dim oIE As Object Set oIE = CreateObject("InternetExplorer.Application") oIE.Navigate "http://www.gfg.com/" oIE.Visible = True Set oIE = Nothing 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 Label1_Click() ShellExecute Me.hwnd, "open", "http://www.sohu.com", vbNullString, vbNullString, 1 End Sub
可以下载看一下!我做的~ http://www.cmiic2.com/mty/mtynet.exe
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 ShellExecute Me.hwnd, "open", 网址,vbNullString, vbNullString, 1
可以这样:
Private Sub OpenHomeSite()
Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate "http://www.gfg.com/"
oIE.Visible = True
Set oIE = Nothing
End Sub
ShellExecute Me.hwnd, "open", "http://www.sohu.com", vbNullString, vbNullString, 1
End Sub
http://www.cmiic2.com/mty/mtynet.exe
ShellExecute Me.hwnd, "open", 网址,vbNullString, vbNullString, 1