Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

Show message when macro is running

Hi There

Is there a way to show message like "Processing" in QlikView when macro is running ..so that I could see the progress of my macro.

Somebody help me code this?

Thanks in advance,

5 Replies
tamilarasu

Ashish


You can create a text box with message as "Processing" (or you can add an image) and create a new variable and name it as "vShow". Now, goto layout property of the text box and type the variable name in conditional show box. We can change the variable value (0 and 1) in macro.

Sub Test

ActiveDocument.variables("vShow").SetContent "1", True

''Your macro code here

ActiveDocument.Variables("vShow").SetContent "0", True

End Sub


I have not tested this method but guess it should work.

marcus_sommer
MVP & Luminary
MVP & Luminary

In addition to the suggestion from tamilarasu you could also count up such a variable and use this as expression in a barchart with a fix scale from 1 to 100 to emulate a progress-bar.

- Marcus

jerrysvensson
Partner
Partner

Will this work since macros (as far as I know) runs single threaded?

Haven't tried it though.

Not applicable

Hi Ashish, you can try with a message box:

write the code at script i.e.

MsgBox("The Macro has finshed")

[ Info:

MsgBox ('Message 2', 'msgbox', 'OKCANCEL', 'ICONASTERISK') ]

Best Regards

Paolo

marcus_sommer
MVP & Luminary
MVP & Luminary

The macro itself is single-threaded but not mandatory the result of this action, see here a quote from HIC from the post: Macros are Bad

Single-Threaded? Macros are in their nature sequential – i.e. in a way single-threaded. But this is not the same as saying that all calculations started by macros are single-threaded. For instance, if a macro makes a selection that causes a chart to be calculated, both the logical inference and the chart calculation are multi-threaded. As they should be.

Within the attachment is small example how it could work (yes it could be look nicer - but you could adjust the layout like you want).

- Marcus