Use VBA Detect File Location

R

Ross

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

Thanks,

Ross
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top