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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

searchable value with macro

I need to select from straight table only these rows where column value is yes and after that I export the data to Excel. I made that column searchable and its work perfect if I write value in searchable box. But in future this file will work automatically and I must do the searchable thing with macro. Can anybody give me some hints how to do it? Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

You can make a direct selection using:

ActiveDocument.Fields("FIELD").Select "*SEARCH*", true


If you can put your search value into a variable, you can use:

searchVal = ActiveDocument.Variables("vTest").GetContent.String
ActiveDocument.Fields("FIELD").Select "*" & searchVal & "*", true


View solution in original post

3 Replies
Not applicable
Author

You can make a direct selection using:

ActiveDocument.Fields("FIELD").Select "*SEARCH*", true


If you can put your search value into a variable, you can use:

searchVal = ActiveDocument.Variables("vTest").GetContent.String
ActiveDocument.Fields("FIELD").Select "*" & searchVal & "*", true


Not applicable
Author

But what do to when the FIELD is not database field but calculated?

Not applicable
Author

What do you mean by calculated?

In order to make a selection, there has to be an underlying field to select on.