View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] acampbell012@yahoo.com is offline
external usenet poster
 
Posts: 129
Default Date formula in file name

Try this:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ActiveWorkbook.SaveAs Filename:="Stock as of " & Format(Date,
"yyyy-mm-dd") & ".xls"
End Sub

santaviga wrote:
Hi,

I'm looking to see if possible a date is inserted before or after the file
name on saving.

e.g. Stock as of 25/10/2006 (this as the file name auto updated when the
file is saved by the user.

Is this possible???

Thanks