VBA 開啟檔案

VBA 開啟檔案

Option Compare Database
Option Explicit

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

Public Enum enuShowWindow
SW_MAXIMIZE = 3
SW_MINIMIZE = 6
SW_RESTORE = 9
SW_HIDE = 0
SW_SHOWNA = 8
SW_SHOWNOACTIVATE = 4
SW_SHOWNORMAL = 1
SW_SHOWMINNOACTIVE = 7
End Enum

Private Sub btnBrowse_Click()
Dim summy As Integer
summy = ShellExecute(0, "open", "E:\LEO\My
Documents\SoftwareDevise\Restaurant\RestaurantHelp.chm", "", "",
SW_SHOWNORMAL)
MsgBox (summy)
End Sub

0 Comments:

 
© 2008 Blogger Template Layout Design by [ Fanchie AirHead ]