View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ingolf Ingolf is offline
external usenet poster
 
Posts: 32
Default set excel <filename to <filename-date

Hi Bob,

copy the following code to the module of your workbook. This will add
the date to your workbook name and save the workbook on opening it.

Private Sub Workbook_Open()
ThisWorkbook.SaveAs Filename:=Left(ThisWorkbook.FullName, _
Len(ThisWorkbook.FullName) - 4) & "-" & Format(Date, "mmddyy") & ".xls"
End Sub

Regards,
Ingolf

bob engler schrieb:

I would like to have the filename of a excel WB set to
<filename-currentdate on open the original file so when
the people save it, it will save it to the new name. ie:

open MGA (template file) and make the active WB
MGA-071106 would be a copy of MGA.xls. That way when
the people click Save, it will save it to the correct new file (they
have problems following simple instructions).

Thanks...