Dear all,

I am using a simple Auto_open macro (below) with the intention of having the blank Workbook that Excel opens when I start Excel be based on a specific template rather than the default Excel template. The macro works fine for that purpose, but when I launch Excel by double clicking a specific workbook the macro intervenes and launches a blank workbook based on book.xltx rather than launching the book I double clicked. I'd like to find a way to have the macro check whether Excel was started 'fresh' or by double clicking a specific workbook, and only run the workbook.add command in the case that Excel was started fresh, if that makes sense. Or just find a better way of forcing Excel to use my preferred template for new workbooks. Grateful for any insights.


Sub Auto_Open()
'
' Auto_open Macro
'
On Error GoTo newbook
Workbooks.Add ("book.xltx")

Exit Sub
newbook:
Workbooks.Add
On Error GoTo 0
End Sub