Hello,

I am using the following code:

Code:
If fso.FileExists(Dir(DataPath & "\Data_*.txt")) then
'file exists...execute code
End If
This works great if my DataPath has no spaces in it. For example: C:\Test. But if my DataPath variable has spaces like C:\Documents and Settings...then it does not work.

How can I make this code work even if the variable DataPath has spaces? Thanks so much..

Steph!