SourceBrett
New Member
- Joined
- Apr 19, 2019
- Messages
- 6
Code:
[U]EXAMPLE CODE NOT REAL:
[/U]
Private Sub Auto_Open()
If ( Activeworkbook.isNewDocuement() == false ) then
Goto :EOF
End If
' [code example]
' [code example]
' [code example]
:EOF
End Sub
I have a macro that runs each time excel open which works great but now I want it to run only when opening a blank/new workbook. I've tried a few things but can't figure out how to detect weather or not I'm opening a new workbook or an existing one. I'd like to run the check before running the code to save on processes.
Any suggestions?