View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Hayeso Hayeso is offline
external usenet poster
 
Posts: 16
Default set filename to <filename-date on open

Press Alt+F11 to go to the Microsoft Visual Basic Editor
Press CTRL+R to View the Project Explorer
Expand the MGA.xls Project and doubleclick the ThisWorkBook Object
Paste in the following code

Private Sub Workbook_Open()
With Me
.SaveAs .Path & "\MGA-" & Format(Now, "mmddyy") & ".xls"
End With
End Sub

Save and close your workbook



"bob engler" wrote:

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 which is a copy of MGA.xls. That way when
the people click Save, it will save it to the new file (they
have problems following simple instructions.

Thanks...