Use VBA Detect File Location

  • Thread starter Thread starter Ross
  • Start date Start date
R

Ross

How can I use VBA to test a File Location to determine
that it is valid, ie that it exists?

Thanks,

Ross
 
Ross said:
How can I use VBA to test a File Location to determine
that it is valid, ie that it exists?

Use the Dir function:

If Dir(fullpath) = "" Then
'no such file
Else
'file found
End If
 
Back
Top