I am trying to make the following only work in my template: I do not want to open the resulting file and have it try to overwrite itself...which it does since this code exists in that file. What do I have to do in order to make sure my new file does not try to overwrite itself when I go to open it?


Cod:
Private Sub Workbook_Open()
Dim sFileName As String, sPath As String

sPath = "C:\Daily Logs\"  
sFileName = Format(Now(), "ddmmmyy") & ".xls"
'File =sPath & sFileName 
ActiveWorkbook.SaveAs (sPath & sFileName)
End Sub