Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sheet Macros

I'm trying to set a macro so that when opening a sheet two options from the "Cateogory" field are selected. I'm not sure about the QlikView script to do so. Below is an example that I've tried that does not work. Any help is very much appreciated!





Sub

SetPain_Communication





ActiveDocument.Fields("Category").Select("Pain")

AND

ActiveDocument.Fields("Category").Select("Communication")





endsub





1 Solution

Accepted Solutions
Not applicable
Author

Is your macro triggering properly, but only leaving you with Communication selected? The Select function makes the value passed the one and only selection when used.

You need:

ActiveDocument.Fields("Category").Select("Pain")
ActiveDocument.Fields("Category").ToggleSelect("Communication")


That should make Pain the only selected value and then also select Communication. You are left with both Pain and Communication selected.

View solution in original post

2 Replies
Not applicable
Author

Is your macro triggering properly, but only leaving you with Communication selected? The Select function makes the value passed the one and only selection when used.

You need:

ActiveDocument.Fields("Category").Select("Pain")
ActiveDocument.Fields("Category").ToggleSelect("Communication")


That should make Pain the only selected value and then also select Communication. You are left with both Pain and Communication selected.

Not applicable
Author

That works! Thank you!!!