Next i
End Sub
'子程序:::::打开文件
Sub ShellPro(DrivePro As String)
On Error GoTo Err_file:
If Not IsEmptyCDROM(DrivePro) Then
Shell (DrivePro & "Hello.exe") '打开文件路径
Unload Me
End'并结束本程序
Else
Debug.Print "CD-ROM is Empty"
End If
Err_file:
If Err.Description = "错语的文件名或号码" Then Exit Sub
End Sub
Function IsEmptyCDROM(sDrive As String)
Dim s
On Error GoTo ErrHandle
s = Dir(sDrive + "*.*")
IsEmptyCDROM = False
Exit Function
ErrHandle:
IsEmptyCDROM = True
End Function
上一页 [1] [2] [3]
责任编辑:cyth