Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Saving a file with todays date on the end

Hi,

Could somebody please help me with some code to save a file, with a
standard file name, but with todays date on the end. e.g.
Combined_14.04.04.xls

Thanks in advance.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Saving a file with todays date on the end

ACtiveWorkbook.SaveAs Filename:="Combined_" & Format(Date,"yy.mm.dd")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tempy" wrote in message
...
Hi,

Could somebody please help me with some code to save a file, with a
standard file name, but with todays date on the end. e.g.
Combined_14.04.04.xls

Thanks in advance.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Saving a file with todays date on the end

Thanks Bob, your suggestion works great.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Saving a file with todays date on the end

For your backup or daily file.

Would suggest that you use four digit year and put that first
then the month then the day of the month so that you can
find them quickly in a directory in alphabetical order.
http://www.mvps.org/dmcritchie/excel/backup.htm



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with todays date on the end

Bob,

Just want to say "Thanks" as I also benefitted from your solution.

SLC
:

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Saving a file with todays date on the end

Great, 2 for 1 <vbg

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"slc " wrote in message
...
Bob,

Just want to say "Thanks" as I also benefitted from your solution.

SLC
:)


---
Message posted from http://www.ExcelForum.com/



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with todays date on the end

hey!

Try something like this!

Function GetName(Dia As Date) As String
Dim AuxStr As String
AuxStr = Format(Dia, "dd-mmm-yyyy")
GetName = "Combined Automatic Update - " & AuxStr & ".xls"
End Function


Sub SaveUpdate(Route As String)

'make sure the path exists and its right!!!

Route = "C:\Documents and Settings\Administrator\Desktop\updat
automatic\"
Dim Name As String
Dim I As Integer
If Right(Route, 1) < "\" Then Route = Route & "\"
Name = GetName(Now())
If Dir(Route & Name) < "" Then
I = 1
Name = Left(Name, Len(Name) - 4)
While Dir(Route & Name & " Version (0" & I & ")" & ".xls") <
""
I = I + 1
Wend
Name = Name & " Version (0" & I & ")" & ".xls"
End If
ActiveWorkbook.SaveCopyAs Route & Name
End Sub

M

--
Message posted from http://www.ExcelForum.com

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 file as todays date Rinto Syah Excel Discussion (Misc queries) 4 May 4th 09 11:39 AM
Save file with todays date ref#11235 [email protected] Excel Worksheet Functions 2 January 29th 09 06:59 PM
Saveing workbook to a file as todays date daily mikespeck Excel Worksheet Functions 0 August 22nd 06 01:27 PM
Saving workbook with todays date sd look Excel Discussion (Misc queries) 1 April 28th 05 09:22 AM
Automatic Populate Todays Date in Cell when File is Saved. Nello Excel Discussion (Misc queries) 3 April 21st 05 11:08 PM


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