Hi everybody,
This came up while testing code for the thread "Incremental number for saved files".
I find this to be too generic by itself though, so I'm opening this thread.
Here we go: In order to have the Dir function return files, a path and a pattern can be specified as the function's parameter.
e.g. strFile = Dir(strPath & "\" & "VBAX" & "*")
Fine.
Now I expect this function to return all files from the specified path that start with "VBAX", right? e.g. 'VBAX.xls', 'VBAXall.txt', 'VBAX Forum.doc' and so on.
I also expect it to ignore files like 'VB AXIS.xls', 'V B A X.doc' because they just don't match the pattern I entered, right?
And how about 'VB A X.txt' for crying out loud (6 spaces and 2 spaces here, it doesn't show because the forum's text editor cuts off extra spaces but that's what I entered in this filename)!!!
It should definitely be ignored RIGHT?
WRONG!
I'm out of words here. Your comments (pretty please)...