check whether a file exists
Private Sub Form_Load()
Dim objfso As New FileSystemObject
If objfso.FileExists(”f:test.txt”) Then
MsgBox “The file exists”, vbInformation
Else
MsgBox “The file does not exist”, vbInformation
End If
End Sub
Related posts:
- checks whether a drive exists Private Sub Form_Load() Dim objfso As New FileSystemObject If objfso.DriveExists(”h:”)...
- check whether you can play audio files Private Declare Function waveOutGetNumDevs Lib “winmm.dll” () As Long Private...
- copy a text file Private Sub Form_Load() Dim objfso As New FileSystemObject objfso.CopyFile “D:Test.txt”,...
- This program deletes a file Public sub Form_Load() Dim objfso As New FileSystemObject objfso.DeleteFile “D:Test.txt”...
- Display a CSV file Display a CSV file CSV files are common formats to...
Related posts brought to you by Yet Another Related Posts Plugin.



















































Post a comment