Option ExplicitPublic strcategoryid As String Public strproviderid As String Public stremployeeid As String Public stremployee As String Public strprovider As String Public 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 'the above is used to link the online webPrivate Sub mnuOnline_Click() Dim a a = ShellExecute(Me.hwnd, "open", "http://www.efu.com.cn", "", App.Path, 1) End Sub
Private Sub Command1_Click() Shell "start.exe C:\aa.htm", vbHide 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 Command4_Click() '打开 "C:\Windows" ShellExecute Me.hwnd, "open", "www.csdn.net", "", App.Path, 1 End Sub
现在引用中选引用Microsoft Internet Controls(shdocvw.dll)然后 Set Explorer = New SHDocVw.InternetExplorer Explorer.Visible = True Explorer.Navigate "http://xxx.xxx.xxx/xx.html"
Public strproviderid As String
Public stremployeeid As String
Public stremployee As String
Public strprovider As String
Public 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
'the above is used to link the online webPrivate Sub mnuOnline_Click()
Dim a
a = ShellExecute(Me.hwnd, "open", "http://www.efu.com.cn", "", App.Path, 1)
End Sub
Shell "start.exe C:\aa.htm", vbHide
End Sub
ShellExecute Me.hwnd, "open", "www.csdn.net", "", App.Path, 1
End Sub
Set Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate "http://xxx.xxx.xxx/xx.html"
直接用下面的语句:
Shell "Explorer.exe HTML页面的地址"
就可以了!