Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Automatically saving an Excel spreadsheet with today's date in the filename

Firstly, thank you CHRIS for solving my problem relating to disabling
macros - I tried to reply to you but my password is not recognised.

I now wish to save a file with today's date automatically in the
filename, for example:

"Accounts figures 28 April 2004.xls"

Can the date be inserted automatically?

Any ideas?

Thank you.

Kind regards,

Ian M
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Automatically saving an Excel spreadsheet with today's date in the filename

Put this code in your Workbook BeforeClose Event found in ThisWorkbook of your project windo

Private Sub Workbook_BeforeClose(Cancel As Boolean
If InStr(ActiveWorkbook.Name, CStr(Format(Now, "dd mmmm yyyy"))) = 0 The
ActiveWorkbook.SaveAs Filename:=
"Accounts figures" & " " & CStr(Format(Now, "dd mmmm yyyy")
End I
End Su

----- Ian M wrote: ----

Firstly, thank you CHRIS for solving my problem relating to disablin
macros - I tried to reply to you but my password is not recognised

I now wish to save a file with today's date automatically in th
filename, for example

"Accounts figures 28 April 2004.xls

Can the date be inserted automatically

Any ideas

Thank you

Kind regards

Ian

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Automatically saving an Excel spreadsheet with today's date in the filename

Chris

This works perfectly as well.

Thanks again!

Ian M



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
automatically enter today's date as a static entry in Excel TJ Excel Discussion (Misc queries) 3 July 25th 08 04:44 AM
How to automatically goto to today's date Hans gmail Excel Worksheet Functions 4 January 26th 07 05:41 AM
Automatically enter today's date as a static entry David Links and Linking in Excel 2 June 6th 05 12:08 AM
Automatically enter today's date as a static entry David Excel Worksheet Functions 1 June 4th 05 04:54 PM
Setting today's date automatically in Excel. Ezlpo Excel Worksheet Functions 6 February 11th 05 02:27 PM


All times are GMT +1. The time now is 01:54 AM.

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"