I take it you're using the code I gave you earlier? If so, then you can either choose to have all subfolders searched or no subfolders searched - you can't omit some folders but include others. To omit all subfolders do something like this:-
.SearchSubfolders=False
If you want something else then please be a tad more specific i.e. which folders do you want to include/exclude?
The only thing now is that the file names and locations that are the result of the search are logged in A1 downwards. Is there a way to stop this record being made and just open the appropriate files? (So that the button can be used over without having to delete the data? if this makes any sense)
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.