jnettle1

Cancel close Document function

Discussion created by jnettle1 on May 9, 2011
Latest reply on May 12, 2011 by jnettle1
I am using VB in ArcMap 9.3.1 I have a "BeforeCloseDocument" function set up to remind me to do something before I close the map. If I have remembered to do it, I want to hit "Ok" and for the map to Close. If I haven't done it, I want to hit "Cancel" and for the map to stay open so I can run my field Calc. 

Is this possible at all?

Code below....


Private Function MxDocument_BeforeCloseDocument() As Boolean
   MsgBox "Did you run Accident Cause Field Calculation? If so, hit ok to close map. If not, hit cancel and run Calculation.", vbOKCancel, "Reminder!!!"
End Function

Outcomes