Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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.
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
Will this work since macros (as far as I know) runs single threaded?
Haven't tried it though.
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
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