Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    shutdown modeless userform (Eng/Exce/2000)

    I have a self-made Excel VBA program used by different people which uses only 1 workbook with several sheets in it nbut also all the VBA modules and userforms.
    Because this workbook is big in size and is stored on the server it takes time to save it after the user finished the application by means of the custom toolbar.
    Here is my problem; I want during this 'saving' phase (=resetting original toolbars and saving file) a message to the user (modeless userform ?) to wait for shutting down the application, and resetting Excel.
    my solution; I created a modeless userform with messages to wait,..., but when the application is finished, the userform pops up, but nothing is showed on it.When I make this userform modal, it does work, but of course there is a user intervention neccessary by clicking on the close box before the macro continues.
    Where is the problem?
    many thanks, roland, belgium

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: shutdown modeless userform (Eng/Exce/2000)

    Immediately after showing the userform, repaint it. For example for a form named frmMessage:

    frmMessage.Show
    frmMessage.Repaint
    ' rest of code goes here

  3. #3
    New Lounger
    Join Date
    Jan 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: shutdown modeless userform (Eng/Exce/2000)

    Sorry Hans,
    repaint command doesn't work.
    All the sheets in the workbook are protected. Does this make any difference?
    roland

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: shutdown modeless userform (Eng/Exce/2000)

    Whether the sheets are protected or not shouldn't make a difference.

    Try inserting one or more instructions DoEvents after the Repaint instruction.

Posting Permissions

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