Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a list box where I needed to give the user the ability to select only one value which is an option available on the general tab--> "Always One Slected value"
How can I make the list box to be cleard off when the user moves to other tabs.
Note that I have a clear all trigger on the sheets but because of the One Selected Value that list box is not getting cleared off.
Anybody has an idea?
Thxs for your help
Alec,
HI
Use in macro:
Sub AlwaysOneSelected
set obj = ActiveDocument.GetSheetObject("LB02")
set boxfield=obj.GetField
set fprop = boxfield.GetProperties
fprop.OneAndOnlyOne = True
boxfield.SetProperties fprop
End Sub
Sub RemoveAlwaysOneSelected
set obj = ActiveDocument.GetSheetObject("LB02")
set boxfield=obj.GetField
set fprop = boxfield.GetProperties
fprop.OneAndOnlyOne = False
boxfield.SetProperties fprop
ActiveDocument.ClearAll True
End Sub
I learn from Deepak Vadithala from this post:
http://community.qlik.com/message/154380#154380
Hope it helps u also..
Hi,
thanks for the information.
I have never created macros yet.
May you please tell me where should I type the script that you provided ?
Thxs again
Alec,
HI
PFA
Hi,
Thxs again for the sample. it is exactly what I am looking for but I don't know how to create the Macro.
I know how to call it if it is already created but don't know how to create it.
I appreciate it if you can provide how to create a macro
Thxs,
Alec
I also know how to access the Edit Module but don't know how to add the macro
Thxs,
Hi
Please see the sheet properties -> Trigger ..
edit actions...
In that u can see what you want..
Hope it helps
Thxs, I got it.
My question was where should I type the script in theedit Module. I just copied it there and everything is working.
Have a wonderfull weekend!
Alec
Hi again,
I am still getting an issue.
When I apply the macro on a trigger it works but at the same time I loose all the other triggers on the same sheet.
The triggers that I have on the sheet are listed after the macro run and they are selections on different fields.
I appreciate any help!
Thxs,
Alec
Hi
Demote the macro trigger at last n tested once..
May be it helps