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
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", "C:\1.PPT", "", "", 1 '打开文件C:\1.PPT
End Sub
Private Sub Command1_Click()
lpFile As String
A as bool
lpFile ="C:\"
......
for each FileObj as FoldrObj
if ((instr(FileObj.Name,"年")<>0) and (instr(FileObj.Name,"月")<>0) and (instr(FileObj.Name,"日")<>0) and (instr(FileObj.Name,"数据")<>0)) then
A=ShellExecute( Me.hwnd, "open", FileObj.Name, "", "", 1 '打开文件FileObj.Name)
if A<>0 then
.......
endif
endif
next
End Sub