Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy two sheets into new files and save to multiple locations XP Excel Programming 2 November 26th 08 02:46 PM
Macro to open *.dat files and save as .txt (comma delimited text files) [email protected] Excel Programming 2 November 30th 05 05:50 AM
How to save sheets in new excel files, automatically? SuperDuck Excel Worksheet Functions 1 October 22nd 05 09:37 AM
How do I save sheets in a workbook to separate files? Omzala Excel Worksheet Functions 2 January 13th 05 06:23 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"