musclecarlover07
Registered User.
- Local time
- Today, 08:24
- Joined
- May 4, 2012
- Messages
- 236
I have a button that when pressed it checks a specific file for documents with the same name (example: Test, Test 1, Test 180, ect...)
The problem with this is if there are 2 files with Test (Test, Test - Copy) It gives me 2 separate message boxes. The first with Test. Then a second message box with the second file, Test - Copy. I want to combine both of the message boxes in to one. So the message box would look like:
Test
Test - Copy
Code:
Dim StrFile As String
StrFile = Dir("C:\Users\John\Desktop\Test\*test*")
Do While Len(StrFile) > 0
Debug.Print StrFile
MsgBox StrFile
StrFile = Dir
Loop
Test
Test - Copy