I do it as follows:
Name a cell in worksheet "X" as (say) AutoOpenExecuted.
Add a Workbook_Open procedure (you probably have one
already) and, at the end of it, insert
Sheets("X").Range("AutoOpenExecuted").Value = True
Also add a Workbook_BeforeSave procedure and include in it:
Sheets("X").Range("AutoOpenExecuted").value = False
In a frequently-used procedure, such as one you call at
the beginning of other procedures to perform housekeeping
tasks, or the Class_Initialize procedure for a frequently-
used class, insert:
If Sheets("X").Range("AutOpenExecuted") = False then _
MsgBox "Don't hold shift key when opening workbook"
Thisworkbook.Close SaveChanges:=False
The trick is to find the right place (or places) to check
if the cell is True or False.