Imagine a series of folders with names such as:
Kirk [1]
Scotty [2]
Sulu [3]
Uhura [4]
I need some code such that I can pass the number (3) and it returns Sulu [3]. At the moment I'm doing it like this:
where ref is 3 and InFolder is the path containing the series of folders.
Would it be faster to do this using the FSO and if so what would the syntax be? Can it be done in one line?
- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
Kirk [1]
Scotty [2]
Sulu [3]
Uhura [4]
I need some code such that I can pass the number (3) and it returns Sulu [3]. At the moment I'm doing it like this:
Code:
FolderName = Dir$(InFolder & "\*[" & Ref & "]", vbDirectory)
Would it be faster to do this using the FSO and if so what would the syntax be? Can it be done in one line?
- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments