VBA Access getting Run-time error '13'; Type Mismatch
Public Function modCreditmove()
Dim fso, CB As String
Set fso = CreateObject("Scripting.FileSystemObject")
CB = ("H:\Credit*.xls")
If CB > 0 Then
fso.MoveFile ("H:\Credit*.xls"), "H:\Credit_Archive\"
End If
End Function
This is the code I am using to Move files for archive , I had the code
working when there were files to move and then it threw an error code when
there wasn't any files to move So I tried to add an if statement so there
wasn't any error msgs popping up and I got the Run-time error '13', Type
mismatch can someone help assist so i can do this the correct way. Thanks
No comments:
Post a Comment