Consulting

Results 1 to 3 of 3

Thread: Wronf priority of events? picture in form not showing because heavy processing

  1. #1
    VBAX Regular
    Joined
    Mar 2013
    Posts
    80
    Location

    Wronf priority of events? picture in form not showing because heavy processing

    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?

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    You have modal and modeless confused. Try adding either DoEvents or PleaseWait.Repaint after showing the form.
    Be as you wish to seem

  3. #3
    VBAX Regular
    Joined
    Mar 2013
    Posts
    80
    Location
    works fine! Thanks a million

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •