hi,
Quick question (hopefully). I am trying to put a check on my code. I have a textbox (txtPath) where I put the value of the path of a file the user selects. Everytime I try to put a check on it though, it says, "Incompatible Type" or something like that. It works fine without the check, however, I would like the code to put out a msgbox if the user clicks on "upload" without selecting a file.
A part of my code is below:
It keeps complaining around the line:
If filesys.FileExists(txtPath)...
Anyone know how to fix it?
Please?
Thank you so much in advance...
Quick question (hopefully). I am trying to put a check on my code. I have a textbox (txtPath) where I put the value of the path of a file the user selects. Everytime I try to put a check on it though, it says, "Incompatible Type" or something like that. It works fine without the check, however, I would like the code to put out a msgbox if the user clicks on "upload" without selecting a file.
A part of my code is below:
Code:
If txtPath = Null Then
MsgBox "Please select a file!", vbOkOnly, "File Missing!"
Else
'....some code here...
If filesys.FileExists(txtPath) Then
filesys.CopyFile txtPath, destPath
MsgBox "File Upload Successful.
End If
If filesys.FileExists(txtPath)...
Anyone know how to fix it?
Please?
Thank you so much in advance...