Thread: Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Crowbar via OfficeKB.com Crowbar via OfficeKB.com is offline
external usenet poster
 
Posts: 128
Default Macro

Hello, I can help

I think that you are saying you need to automatically generate a unique
filename when you save.

Before doing this you may want to consider how the file name will differ ie

If you save a new one each day, you could start the filename with the same
description and then end it with the date.

This would create uniformity within your directory and can be applyed within
your script.

Dim MyDate As Date
MyDate = Date



ChDir "C:\2007 Client Package"
ActiveWorkbook.SaveAs Filename:= _
"C:\2007 Client Package\jones 2007 Client Package" & Format(MyDate,
"dd-mmm-yy") &".xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200710/1