Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with Macro

Hi everyone...I have the following macro which loops through my data and print available dashboards. But i am stuck on how to force it to display the print dialog box to enable the user to select which printer they wish to use.
Can anyone help please?
SUB PrintDashboard


SET val=ActiveDocument.Fields("%KEY%").GETPOSSIBLEVALUES(100)
FOR i = 0 to val.count-1
ActiveDocument.Fields("%KEY%").SELECT val.item(i).Text
ActiveDocument.ActiveSheet.print

NEXT
ActiveDocument.Fields( "%KEY%").Clear
END SUB
T hanks
1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Try:

activesheet.dialogprint

View solution in original post

4 Replies
m_woolf
Master II
Master II

Try:

activesheet.dialogprint

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, where in the macro would this go? i have just tried at the beginning and end but it didn't work...

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

hi, it ok, i have it working

SUB PrintDashboard


SET val=ActiveDocument.Fields("%KEY%").GETPOSSIBLEVALUES(100)
FOR i = 0 to val.count-1
ActiveDocument.Fields("%KEY%").SELECT val.item(i).Text
ActiveDocument.ActiveSheet.Dialogprint

NEXT
ActiveDocument.Fields( "%KEY%").Clear
END SUB

Thanks for your help.

m_woolf
Master II
Master II

Try replacing

ActiveDocument.ActiveSheet.print with

ActiveDocument.ActiveSheet.dialogprint