Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to clear a Selector when the user moves from a certain sheet to another certain sheet. The problem is that it does not concern all changes between sheets. Example: when the user moves from sheet A to sheet B the field should not be cleaned but when the user moves from sheet B to sheet C the filed should be cleaned.
Does anyone have any ides?
Have a look at the Triggers tab on the Sheet properties, in particular the 'OnLeaveSheet' even.
Regards,
Gordon
You can add a selection action to the OnActivate sheet and/or OnLeave sheet events. You can use these triggers to clear fields or set default selections. The only issue is that this needs to be done for each sheet.
Jonathan
If I use the OnActivate sheet I need to know which the previos sheet was, how do I get that information?
You could define a variable LastSheet that you set in OnDeactivate Sheet, and check it in OnActivate.
I tried this in OnDeactivate Sheet:
sub e
xitSheetbut it does not turn out well. When I change sheets, it stops in the macro with this message:
Object required: '[string: "Agent"]'