Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MACRO VBA TO SAVE EVEN IF FILE EXISTS

Hi i have a macro that copies a worksheet and saves in my documents. My
guestion is there a way to save the file with the current date each time.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default MACRO VBA TO SAVE EVEN IF FILE EXISTS

Hi,

Something like;

ActiveWorkbook.Save Environ("userprofile") & "\my documents\my filename " &
Format$(Now, "dd-Mmm-yyyy") & ".xls"

(replace ActiveWorkbook with however you reference your workbook with new
sheet)

Regards,

Chris.
--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"coconutt" wrote:

Hi i have a macro that copies a worksheet and saves in my documents. My
guestion is there a way to save the file with the current date each time.

thanks

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
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
Macro help - "Save As" when a file already exists Dave Excel Programming 1 May 18th 05 07:38 PM
Save as and file exists. Barry Excel Programming 1 June 1st 04 12:05 AM
within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?" Pete McCosh Excel Programming 0 April 2nd 04 04:51 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


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

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

About Us

"It's about Microsoft Excel"