Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a document with multiple sheets. Every sheet has the same list box, titled "SubRegion". When one particular sheet (Sheet "A") is clicked on, I need for 'always one selected value' to be selected in the SubRegion list box (or a macro with similar function). When I leave Sheet A and go to Sheet B, I need to be able to clear the SubRegion value, but not until I exit Sheet A.
Any clue on how to do this? Thanks in advance.
-Michael
No luck?
Hi,
Maybe an example qvw file will better illustrate what you are looking for. Will help in trying to solve your problem
Nimish
Sub SubRegionSelectClear
set ss = ActiveDocument.ActiveSheet
IF ss.GetProperties.Name ="SheetB" THEN
ActiveDocument.Fields("SubRegion").Clear
END IF
END SUB
Hi
This is possible to do via macros but an alternative solution would be to specify a calculation condition on the charts on Sheet A, like this:
if(count(distinct SubRegion)=1, 1, 0)
You can then specify a error message like "You must select one, and only one, value in SubRegion...." by going to Chart properties, click the Error Messages-button and write your text for "Calculation condition unfulfilled".
/Fredrik
Thank you everyone for your feedback. I aim to experiment with both methods today
Michael