Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
Perfect Mark & thanks; that's the solution!!!
Best regards
Stefan
I think that next two lines work better
ActiveDocument.GetApplication.Refresh
ActiveDocument.GetApplication.WaitForIdle