Save As to search subdirectories

mgiehm

New Member
Joined
May 31, 2011
Messages
16
I have a file that saves itself based upon a cell value. It currently checks to see if that file exists already. The issue I'm running into is that I need it to check subfolders and not just the main directory. The files will get moved into different folders and I need to ensure no duplication happens. Any help is greatly appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Which version of Excel do you have? If Excel 2003 (or earlier, I believe) you could use the built-in Application.FileSearch to see if the file exists. Otherwise you could use the FileSystemObject FileExists method within a recursive routine which searches subfolders.
 
Upvote 0
I have looked into it an unfortunately cannot figure it out. It needs to save based upon cell C5's value then -1. I need it to save sequentially as the value in cell C5 may be duplicated. Let's say C5 is 1234 it would save as 1234-1.xls than if another is made it would see that 1234-1 has been created already and save as 1234-2 and so on. The issue is that 1234-1 may have been moved to a sub directory. Is there anyway to do this?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

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.
Go back
Back
Top