I want to Condition wise “Always One Selected Value” Enable/Disable on Button Click. Suppose when I click on one button then it should be enabling but when I click on another button it should be disabling.
I already used macros but my requirement is not fulfilling, may be my macro code is wrong.
set obj = ActiveDocument.GetSheetObject("LB143")
set fprop = boxfield.GetProperties
if boxfield.GetFieldFlags.OneAndOnlyOne then
Looking at you image and what you are wanting to do Always One Selected Value isn't going to do it. Always One Selected Value doesn't stop you from selecting more than one value. It just means that some value in the List Box has to be selected.
right click any one value from left listbox and check always one selected value or else u cant enable always one selected value
I know this option but i want to handle this option conditionally on buttons click. When clicking on one button then it should be enabled and when clicking on another button it should be disabled.
Make two listboxes, one with "always one selected value'' selected, and one not. Use the buttons to hide/show one of the tables.
Very good idea.... Marcos don't always work..
Will that work? My understanding is that the always one selected value is applied to the field (even though you enter it on the listbox object). If you change the setting on one list box, the setting will also change on the other listbox.
+1 on Jonathan's Post.. 'Always One Selected' is applied on the field.
Nushaud, perhaps you can look into using a Slider object to be able to achieve your requirement easier?
You can use 2 sliders, one with 'Multi Value' and another with 'Single Value' (same concept with the 2 listboxes Bert suggested). This should also allow you to have always at least one selected value (unless manually removed from another object).
Only issue would mainly be the appearance.. though you can always hide the scroll arrows..