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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to clear field selections with condition based on variable

I want a macro to launch when a user selects a certain value for a variable in an input box.

If the value of the variable varselect_mach= "Time Utilization"

certain fields should be cleared.

I am a real macro beginner, so I don't know if what I am asking is possible.

What I have up to now is:

sub clear_timefields
p = ActiveDocument.Variables("varselect_mach")
if p.GetContent.String = "Time Utilization"
then
set lb = ActiveDocument.GetSheetObject("LB01")
lb.Clear


end sub

but this probably contains syntax errors...

0 Replies