XLL+ Class Library (7.0)

CXlSuspendError Class

Sets Error to false, and restores it to true when all instances are destroyed. Error is the equivalent of Application.DisplayAlerts in VBA.

class CXlSuspendError


Use this class to switch off the display of alert dialogs during macro operations. Alerts will be restored when the object is destroyed.

If more than one instance of CXlSuspendError exists, then alerts will only be restored when the last one goes out of scope. It is thus possible to declare a local instance of CXlSuspendError in one function, and another one in a function called by the first function. In this case the second instance will effectively be ignored, and screen updating will only be restored when the outermost instance is destroyed.


Header: xlpstatehelpers.h

See Also

CXlSuspendError Methods | xlpstatehelpers.h