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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF macro based on selection

Hi All

I've been looking around the forum and i don't think this has been answered already, my apologies if it has. I've got a report which i would like to include some text boxes which will be updated by some collegues of mine before the report goes out. I would like to have a button which will take them to a set location with set selections made. I've tried applying a bookmark to a button but it doesn't seem to work. It maybe that i'm not using this feature correctly. The other thing i have found is that i can get it to work if i use the book marks menu it will select the page and selections but it does appear to be a bit slow in making the changes.

I am thinking that a macro maybe the quicker way to go as i use a few macro's to export a heap of charts or move to other pages already and they seem to be nice and quick.

the problem i appear to be having is the = section in my macro script:

IF (ActiveDocument.Variables("VComment1Sheet").GetContent. String) = ("SH17") then


ActiveDocument.GetSheet("SH17").Activate













This appears to flag up an error macro parse failed. Functionality was lost. I think that means that it doesn't like part of it.





If anyone has tried this before or has any suggestions they would be greatly appreciated.

Thanks

Michel





1 Reply
Not applicable
Author

Your code is a little hard to follow with all those code blocks. Could you repost it? Use plain text or copy & paste into Notepad before pasting it here.

This should work:

If ActiveDocument.Variables("VComment1Sheet").GetContent.String = "SH17" Then
ActiveDocument.GetSheet("SH17").Activate
End If