Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
thierrytt1102
Partner - Creator II
Partner - Creator II

Selected multiples values using macro

Dear,

I'd like to select 2 years using a macro.

This works for only 1 year :

ActiveDocument.GetField("Year").Select  "2015"

How can I do for 2 values? 

ActiveDocument.GetField("Year").Select  "2015", "2016"  -> doesn't work

Thank you for your help

Labels (1)
1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Thierrytt,

Try,

ActiveDocument.Fields("Year").Select ("(2015|2016)")

View solution in original post

5 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Maybe you can apply this example:Select multiple values from a Field

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

Thanks but it's not exactly what I want, I'd like to have the possibility to select text values and not only numbers as "Year"

Kushal_Chawda
MVP
MVP

Why you are using macro? Can you tell us exactly what you want to do? I think it is possible by triggers.

See this

Macros are Bad

tamilarasu
Champion
Champion

Hi Thierrytt,

Try,

ActiveDocument.Fields("Year").Select ("(2015|2016)")

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

because it's part a pdf printing module using macro