Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
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.
sub SetOneAndOnlyOne
set obj = ActiveDocument.GetSheetObject("LB143")
set boxfield=obj.GetField
set fprop = boxfield.GetProperties
if boxfield.GetFieldFlags.OneAndOnlyOne then
else
end if
end sub
Please help.
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.
Bill
Hi Bill,
So please suggest what should I do to fulfil my requirement.
Regards:
Naushad
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.
Bert
Hi Bert,
Very good idea.... Marcos don't always work..
Bill
Bert
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.
Regards
Jonathan
Thanks Dijks.
+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..
HTH!