Hi,
I've found a VBA macro code on the forum, which lists all the files within a folder. The code works fine when I have the folder location as a static one.
However, I would like to add a wildcard into this line
The reason being, is that I only want the macro to list the file names within the customer letters folder, otherwise the macro takes ages to run and crashes Excel most of the time.
The * what I thought would be ok to be the wildcard, is a folder which is the month name.
Is it possible to have a wildcard like this in a folder path?
Thanks
Lee
I've found a VBA macro code on the forum, which lists all the files within a folder. The code works fine when I have the folder location as a static one.
However, I would like to add a wildcard into this line
Code:
strTopFolderName = "\\Shareddrive\Admin\Letters\2014\*\Customer Letters"
The reason being, is that I only want the macro to list the file names within the customer letters folder, otherwise the macro takes ages to run and crashes Excel most of the time.
The * what I thought would be ok to be the wildcard, is a folder which is the month name.
Is it possible to have a wildcard like this in a folder path?
Thanks
Lee