Saving a workbook on opening .....


Posted by Marc Antoni on September 26, 2001 6:36 AM

I'm trying to find out how I can save a workbook on opening it .
Example : Name of the opened file is Book1.XLS and I want to save it automaticaly to Book2.XLS , It should save it right after I open it .



Posted by Manoel Francisco Dos Santos on September 26, 2001 8:14 PM


I can't imagine why you want to do this. (Are you sure you don't want to make Book1.xls a template(Book1.xlt) instead of a workbook ?)

Anyway, put the following in the Workbook module of Book1.xls :-

Private Sub Workbook_Open()
ThisWorkbook.SaveAs Filename:="Book2.xls"
End Sub