The ClassBeforeChange class function is called for each object to be assigned a new class.
Syntax | ||||
ClassBeforeChange(Cancel, NoClassTerminate) | ||||
Return value | ||||
No | ||||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Cancel |
Boolean |
ByRef |
True prevents the change to another class. |
Required |
NoClassTerminate |
Boolean |
ByRef |
True prevents the call of ClassTerminate. |
Notes
The ClassBeforeChange function is still running in the object whose class is to change. If, when the function is executed, it is determined that a change should be rejected, the Cancel parameter can be set to True. This prevents the object change from continuing.
If you want to prevent the ClassTerminate function of the object from being triggered when an object is reselected, the NoClassTerminate parameter must be set to True.