Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to select a field

I would like to write a macro to select a field -> currency. I have it written in the following, I know it is wrong, but just to give an ideal what I tend to achieve.

Sub SelectField
rem ActiveDocument.Fields(Currency).Select
Activedocument.getfield("Currency")
End Sub

I am trying to turn on/off the green light button of currency by Marco VBAscript once it is run.

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

try like below:

Sub Unselect

ActiveDocument.Fields("Currency").clear

End sub

hope this helps!

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

try like:

Sub SelectField

ActiveDocument.Fields("Currency").select "USD"

End Sub

This will set the Filter to "USD"

hope this helps!

Not applicable
Author

Thanks, can I do de-select as well?

Frank_Hartmann
Master II
Master II

try like below:

Sub Unselect

ActiveDocument.Fields("Currency").clear

End sub

hope this helps!