Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Update Screen (Refresh/Redraw) during macro-run

Hi,

please have a look at the attached file:

I want to start the export (by clicking the button) and during the export the Textbox "TX01" should be shown by setting the variable "v_ExportRunning" to 1.

Is this possible? And how?



(The user should be shown a message or graphic like "the export is running, please wait ...")



(I have also tried to change the visibility of the textbox by a trigger for the OnChange-Event of v_ExportRunning, but the variable-trigger will not be triggered when changing the variable-value by a macro. )

Thanks in advance &

best regards

Stefan







1 Solution

Accepted Solutions
Not applicable
Author

Hello Stefan,

Try WaitForIdle, that should do the trick:

sub Export
ActiveDocument.GetSheetObject("TX01").SetText "Running"
ActiveDocument.GetApplication.WaitForIdle
'Export code
ActiveDocument.GetSheetObject("TX01").SetText ""
end sub


regards Mark

View solution in original post

3 Replies
Not applicable
Author

Hello Stefan,

Try WaitForIdle, that should do the trick:

sub Export
ActiveDocument.GetSheetObject("TX01").SetText "Running"
ActiveDocument.GetApplication.WaitForIdle
'Export code
ActiveDocument.GetSheetObject("TX01").SetText ""
end sub


regards Mark

Not applicable
Author

Perfect Mark & thanks; that's the solution!!!

Best regards
Stefan

longvalery
Contributor
Contributor

I think that next two lines work better

ActiveDocument.GetApplication.Refresh
ActiveDocument.GetApplication.WaitForIdle