Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Sheets In Different Files
Dear felows,
Need your expertise in having a weekly database file with 52 sheets be saved into different files with names as displayed in a specific cell. For instance every sheet has a date in its respective cell C1 as a date, like 1/1/09, 1/8/09, 1/15/09 etc. I want them to be saved in different files each with names like 2009-1-1, 2009-1-8, 2009-1-15 etc. i.e. date in C1 as the filename in the format yyyy-m-d, in a specific folder like D:\NewFolder\ Thanx in advance friends. -- Best Regards, Faraz |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Sheets In Different Files
Hi Faraz
If all the sheets cell c1 has a valid **unique** date the below should do with out any errors.. Sub Macro() Dim wb As Workbook Dim strFolder As String Set wb = ActiveWorkbook strFolder = "D:\NewFolder\" Application.ScreenUpdating = False For Each shTemp In wb.Sheets shTemp.Copy ActiveWorkbook.SaveAs strFolder & Format(Range("c1"), "yyyy-m-d") ActiveWorkbook.Close True Next Application.ScreenUpdating = True End Sub If this post helps click Yes --------------- Jacob Skaria "Faraz A. Qureshi" wrote: Dear felows, Need your expertise in having a weekly database file with 52 sheets be saved into different files with names as displayed in a specific cell. For instance every sheet has a date in its respective cell C1 as a date, like 1/1/09, 1/8/09, 1/15/09 etc. I want them to be saved in different files each with names like 2009-1-1, 2009-1-8, 2009-1-15 etc. i.e. date in C1 as the filename in the format yyyy-m-d, in a specific folder like D:\NewFolder\ Thanx in advance friends. -- Best Regards, Faraz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Sheets In Different Files
See also
http://www.rondebruin.nl/copy6.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Faraz A. Qureshi" wrote in message ... Dear felows, Need your expertise in having a weekly database file with 52 sheets be saved into different files with names as displayed in a specific cell. For instance every sheet has a date in its respective cell C1 as a date, like 1/1/09, 1/8/09, 1/15/09 etc. I want them to be saved in different files each with names like 2009-1-1, 2009-1-8, 2009-1-15 etc. i.e. date in C1 as the filename in the format yyyy-m-d, in a specific folder like D:\NewFolder\ Thanx in advance friends. -- Best Regards, Faraz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy two sheets into new files and save to multiple locations | Excel Programming | |||
Macro to open *.dat files and save as .txt (comma delimited text files) | Excel Programming | |||
How to save sheets in new excel files, automatically? | Excel Worksheet Functions | |||
How do I save sheets in a workbook to separate files? | Excel Worksheet Functions | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |