Hello. This code exits out even if I select a folder. Why?
Please Login or Register to view this content.
Hello. This code exits out even if I select a folder. Why?
Please Login or Register to view this content.
Try something like this...
MyFile = Dir(MyFolder & "*.*")
Or this if you want a specific file extension
MyFile = Dir(MyFolder & "*.xls")
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
Why do I need to add the "*_*" ?
"*.*" is the wildcard for finding all the files in a folder
TIP: In your VBA code, highlight the term Dir and press F1 for an help on the function.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks