Option Compare Database
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long
Const SW_SHOW = 1
Private Sub Enter_Click()
ShellExecute 0, "Open", "c:\aa.doc", "", "", SW_SHOW
End Sub
Private Sub command2_Click()
Dim ex As New Excel.Application
Set ex = CreateObject("excel.application")
Set exwbook = ex.Workbooks.Open(CurrentProject.Path & "\test.xls")
ex.Visible = True
End Sub
Private Sub command3_Click()
Dim exfile As String, shellstg As String
exfile = CurrentProject.Path & "\test.xls"