Put this code in a standard module of your template:
Code:
Option Explicit
Private m_ThisApp As clsThisApp
Sub AutoNew()
InitiateAppClass
lbl_Exit:
Exit Sub
End Sub
Sub AutoOpen()
InitiateAppClass
lbl_Exit:
Exit Sub
End Sub
Sub InitiateAppClass()
Set m_ThisApp = New clsThisApp
End Sub
Put the previous code in a class module that you have named clsThisApp