Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default save worksheet to a folder

How can I save a worksheet from a workbook to another workbook and name it
date saved at using a vb code. And any additional sheet to be saved in the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default save worksheet to a folder

Sub SaveMyWorkbook()
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs Format(Date, "yyyy-mm-dd") & ".xls"
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Hoyos" wrote in message
...
How can I save a worksheet from a workbook to another workbook and name it
date saved at using a vb code. And any additional sheet to be saved in the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default save worksheet to a folder

Thanks Bob.
Will this save the worksheet copied to another folder?
--
Hoyos


"Bob Phillips" wrote:

Sub SaveMyWorkbook()
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs Format(Date, "yyyy-mm-dd") & ".xls"
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Hoyos" wrote in message
...
How can I save a worksheet from a workbook to another workbook and name it
date saved at using a vb code. And any additional sheet to be saved in the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default save worksheet to a folder

Add the folder's path in front of the Format statement. For example...

ActiveWorkbook.SaveAs "c:\temp\" & Format(Date, "yyyy-mm-dd") & ".xls"

Rick


"Hoyos" wrote in message
...
Thanks Bob.
Will this save the worksheet copied to another folder?
--
Hoyos


"Bob Phillips" wrote:

Sub SaveMyWorkbook()
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs Format(Date, "yyyy-mm-dd") & ".xls"
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Hoyos" wrote in message
...
How can I save a worksheet from a workbook to another workbook and name
it
date saved at using a vb code. And any additional sheet to be saved in
the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default save worksheet to a folder

No, if you want that, best to be specific

Sub SaveMyWorkbook()
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs "C:\myFolder\mySubFolder\" & Format(Date,
"yyyy-mm-dd") & ".xls"
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Hoyos" wrote in message
...
Thanks Bob.
Will this save the worksheet copied to another folder?
--
Hoyos


"Bob Phillips" wrote:

Sub SaveMyWorkbook()
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs Format(Date, "yyyy-mm-dd") & ".xls"
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Hoyos" wrote in message
...
How can I save a worksheet from a workbook to another workbook and name
it
date saved at using a vb code. And any additional sheet to be saved in
the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default save worksheet to a folder

Thanks Bob. that works well
--
Hoyos


"Hoyos" wrote:

How can I save a worksheet from a workbook to another workbook and name it
date saved at using a vb code. And any additional sheet to be saved in the
same workbook.
My aim is to be able to save a stat sheet automatically once a week.

--
Hoyos

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
Save sheets in a folder SBárbara Excel Worksheet Functions 2 June 8th 06 04:26 PM
Need code to save file to new folder, erase from old folder Ron M. Excel Discussion (Misc queries) 1 February 24th 06 06:02 PM
"Save As" folder -- can I default this to the same folder as origi Mike Excel Discussion (Misc queries) 1 June 11th 05 12:06 AM
how to save to My Documents folder on different PCs Matthew Excel Worksheet Functions 1 December 14th 04 02:49 AM
Save as Default folder Gerry Cornell Excel Discussion (Misc queries) 2 December 13th 04 06:41 PM


All times are GMT +1. The time now is 03:15 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"