|
1.直接使用Access内置命令 FollowHyperlink
Application.FollowHyperlink "http://www.access-cn.com"
最方便最简单
2.调用IE打开
Dim strUrl As String
Dim objWb as Object
Set objWb = CreateObject("InternetExplorer.Application")
objWb.Visible = True
strUrl = "http://www.office-cn.net"
objWb.Navigate strUrl
3.使用API
''调用API,放置在模块中
Public Declare Function ShellExecuteA Lib "shell32.dll" _
(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
'在命令按钮中调用:
ShellExecuteA Application.hWndAccessApp, "open", "http://www.office-cn.net", vbNullString, vbNullString, 1
|
|