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: 
rustyfishbones
Master II
Master II

Macro to Disable an Alert

Hi All,

I have an Alert that sends an email each time the QVW reloads, but some days I maybe testing and I will reload many times.

I want to create a button on the front end to disable the Alert.

Something like

SUB disablealert

ActiveDocument.GetAlert("AL04").Enabled = false

END SUB

But this is not working

Regards

Alan

13 Replies
rustyfishbones
Master II
Master II
Author

Thanks Tresesco.

That changes the condition, but I want to disable the Enabled Tick Box.

I am already using a Complicated Expression for the Condition of sending the email alert.

But thanks for this, it's interesting.

Regards

Alan

tresesco
MVP
MVP

You can put it like:

Condition= <Your Existing Condition> And variable=1

rustyfishbones
Master II
Master II
Author

Sorry, you are right, I have it working now thanks

marcus_sommer

I think the enable-statement will only work if you set it per properties and not directly:

set docprop = ActiveDocument.GetProperties

set al = docprop.Alerts

al.Item(3).Enabled = true

ActiveDocument.SetProperties docprop

- Marcus