View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
awrex awrex is offline
external usenet poster
 
Posts: 28
Default Code issue - before_save() - Filename with date stamp - worksheet

Could someone tell this tourist why this is not working please??

Private Sub Workbook_BeforeSave()

With ActiveSheet
.Name = "As of " & Format(Now(), "MM-DD-YYYY")
End With

With ActiveWorkbook
.Name = "{FILENAME}" & Format(Now(), "yyyymmdd" & ".xls")
End With

End Sub