G
Guest
Basically I am trying to delate any file in my folder with a mdb extension.
Ive tried using the * wildcard below but VBA takes this literally. Anybody
know what I should change?
Bruce
Private Sub myDelete()
Set fs = CreateObject("Scripting.FileSystemObject")
myDest = "C:\myFolder"
'Delete old replicated files
If fs.FileExists(myDest & "*.mdb") Then
fs.DeleteFile myDest & "*.mdb", True
End If
End Sub
Ive tried using the * wildcard below but VBA takes this literally. Anybody
know what I should change?
Bruce
Private Sub myDelete()
Set fs = CreateObject("Scripting.FileSystemObject")
myDest = "C:\myFolder"
'Delete old replicated files
If fs.FileExists(myDest & "*.mdb") Then
fs.DeleteFile myDest & "*.mdb", True
End If
End Sub