Private Sub Command1_Click()
'============================
Dim fso As FileSystemObject
Dim sFilePath As String
Set fso = New FileSystemObject
sFilePath = "c:\test.txt"
If fso.FileExists(sFilePath) Then
MsgBox "File Exist."
Else
MsgBox "File Doesn't Exist."
End If
End Sub
'============================
Dim fso As FileSystemObject
Dim sFilePath As String
Set fso = New FileSystemObject
sFilePath = "c:\test.txt"
If fso.FileExists(sFilePath) Then
MsgBox "File Exist."
Else
MsgBox "File Doesn't Exist."
End If
End Sub
No comments:
Post a Comment