以下是引用zhengjialon在2005-7-28 14:00:00的发言:
commandButton的单击事件过程中写代码,但要用API:
用API函数
在模块头写声明:
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
单击事件使用:
Call ShellExecute(hwnd, "open",myPath & "f:\2.DOC" , vbNullString, vbNullString, 1)
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) | Powered by Discuz! X3.3 |