dmegginson
New Member
- Joined
- Oct 23, 2011
- Messages
- 5
Hi,
I have a folder called tagnumbers and with in that one there is a bunch of folders with with company names and in those are workbooks with numbers in them
I am trying to create a macro that will allow me to enter a number such as 12345 and have it then look through all my workbooks (around 100 or so) and worksheets with in them (around 20-30) and see if it is entered anywhere in them.
If it is found I would like it to just tell me what workbook it is in and what the sheet name is that it was found in. That is all.
so far I can make it do what I want but I can't get it to loop through all the subfolders. right now I have put each folder path in the code then search then change the path to a different one and do the search again.
Is there a way I can just set the folder path to C:\tagnumbers\
and have it look through the subfolders automatically?
that way I won't have to keep going in to change the path in the code.
Thanks for the help.
DAN.
I have a folder called tagnumbers and with in that one there is a bunch of folders with with company names and in those are workbooks with numbers in them
I am trying to create a macro that will allow me to enter a number such as 12345 and have it then look through all my workbooks (around 100 or so) and worksheets with in them (around 20-30) and see if it is entered anywhere in them.
If it is found I would like it to just tell me what workbook it is in and what the sheet name is that it was found in. That is all.
so far I can make it do what I want but I can't get it to loop through all the subfolders. right now I have put each folder path in the code then search then change the path to a different one and do the search again.
Is there a way I can just set the folder path to C:\tagnumbers\
and have it look through the subfolders automatically?
that way I won't have to keep going in to change the path in the code.
Thanks for the help.
DAN.