PDA

View Full Version : [SOLVED] Wronf priority of events? picture in form not showing because heavy processing



ValerieT
07-30-2014, 03:18 AM
Hello
All my macros start with a GetReady Function, and end with a GetExit Function. Basically, it shows a form "PleaseWait" that contains only a static picture, then another form "ItsDone" when finished.
Usually it seems fine, but if the process is heavy:

If I make "Pleasewait" modal, (which I want) the form popups but not the picture in it.. it appears only when job is finished, meaning too late
If I make the form modeless it is OK but then of course, the rest won't follow


Public Function GetReady()
PleaseWait.Show 0
Application.Cursor = xlWait
Application.ScreenUpdating = False
End Function

Public Function GetExit()
ShowAll
PleaseWait.HIDE
Application.Cursor = Default
Application.ScreenUpdating = True
ItsDone.Show 0
End Function




Any idea to help?

Aflatoon
07-30-2014, 03:25 AM
You have modal and modeless confused. Try adding either DoEvents or PleaseWait.Repaint after showing the form.

ValerieT
07-30-2014, 03:56 AM
works fine! Thanks a million