+ Reply to Thread
Results 1 to 15 of 15

User form/ to show please wait

  1. #1
    Momo
    Guest

    User form/ to show please wait

    Any help please?

    I want to add into a macro a userform or something so that when the macro is
    started a little notice appears saying "Please Wait" or something and stays
    on for the duration of the macro and then closes automatically at the end of
    the macro? when i try putting in a show aznd then a hide it opens and waits
    for a response, any help please,

    Many thanks,

    Andy

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    In the properties for the userform, Change the ShowModal to False.

    - Mangesh

  3. #3
    Tom Ogilvy
    Guest

    Re: User form/ to show please wait

    Make it non modal

    Userform1.show vbModeless
    --
    Regards,
    Tom Ogilvy

    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > Any help please?
    >
    > I want to add into a macro a userform or something so that when the macro

    is
    > started a little notice appears saying "Please Wait" or something and

    stays
    > on for the duration of the macro and then closes automatically at the end

    of
    > the macro? when i try putting in a show aznd then a hide it opens and

    waits
    > for a response, any help please,
    >
    > Many thanks,
    >
    > Andy




  4. #4
    Mike Fogleman
    Guest

    Re: User form/ to show please wait

    A simpler method, but effective is to show an empty area of the sheet with a
    message in a cell while the macro runs.

    Sub Wait()
    ActiveSheet.Range("DN10").Value = "Please Wait..."
    Range("DN9").Activate
    Application.ScreenUpdating = False
    'Your routine Here
    Range("DN10").Clear
    Application.ScreenUpdating = True
    Range("A1").Select
    End Sub

    Mike F

    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > Any help please?
    >
    > I want to add into a macro a userform or something so that when the macro
    > is
    > started a little notice appears saying "Please Wait" or something and
    > stays
    > on for the duration of the macro and then closes automatically at the end
    > of
    > the macro? when i try putting in a show aznd then a hide it opens and
    > waits
    > for a response, any help please,
    >
    > Many thanks,
    >
    > Andy




  5. #5
    Momo
    Guest

    Re: User form/ to show please wait

    Thanks tom, this seems to work, just one thing, how do i get the userform to
    then close once the macro has finished?

    Thanks

    andy



  6. #6
    Momo
    Guest

    RE: User form/ to show please wait

    Tom, I have now got it to close at the end of the macro, just wondering if
    there is any way of removing the close option when the window pops up, the
    little x in the corner,

    thanks

    Andy



  7. #7
    Tom Ogilvy
    Guest

    Re: User form/ to show please wait

    Unload Userform1 at the end of your code

    --
    Regards,
    Tom Ogilvy

    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks tom, this seems to work, just one thing, how do i get the userform

    to
    > then close once the macro has finished?
    >
    > Thanks
    >
    > andy
    >
    >




  8. #8
    Tom Ogilvy
    Guest

    Re: User form/ to show please wait

    Use the queryclose event to cancel the attempt.

    http://support.microsoft.com/default...b;en-us;213713
    XL2000: Preventing UserForm from Being Dismissed with Close Button

    works with all versions of excel that support userforms.

    --
    Regards,
    Tom Ogilvy



    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > Tom, I have now got it to close at the end of the macro, just wondering if
    > there is any way of removing the close option when the window pops up, the
    > little x in the corner,
    >
    > thanks
    >
    > Andy
    >
    >




  9. #9
    Momo
    Guest

    RE: User form/ to show please wait

    I put userform1.hide at the end, is that the way to do it? it got rid of it

  10. #10
    Tom Ogilvy
    Guest

    Re: User form/ to show please wait

    I would suggest unloading it:

    Unload Userform1 at the end of your code

    --
    Regards,
    Tom Ogilvy

    --
    Regards,
    Tom Ogilvy

    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > I put userform1.hide at the end, is that the way to do it? it got rid of

    it



  11. #11
    Momo
    Guest

    Re: User form/ to show please wait

    Tom,

    one last thing,

    when i now run my macro the user form appears, but the label which i have
    written the text appears as a white empty box, is this because of the
    vbmodeless?
    if so am i better just to write what i want as the title of the form?

    thanks,

    Andy

  12. #12
    Tom Ogilvy
    Guest

    Re: User form/ to show please wait

    Userform1.show vbModeless
    doevents

    .. . .

    Unload Userform1

    --
    Regards,
    Tom Ogilvy



    "Momo" <
    [email protected]> wrote in message
    news:[email protected]...
    > Tom,
    >
    > one last thing,
    >
    > when i now run my macro the user form appears, but the label which i have
    > written the text appears as a white empty box, is this because of the
    > vbmodeless?
    > if so am i better just to write what i want as the title of the form?
    >
    > thanks,
    >
    > Andy




  13. #13
    Registered User
    Join Date
    12-14-2018
    Location
    Amsterdam
    MS-Off Ver
    Office 2007 & 2016
    Posts
    23

    Question Re: User form/ to show please wait

    I know this is an old thread, but am hoping someone can help.
    I created an user-form (pop-up1), and used this

    Userform1.show vbModeless
    doevents

    ..My code here..

    Unload Userform1

    but I have a problem while running my code.
    After a little while pop-up1 disappears completely, only to reappear as popup2 without the the red banner and text.
    The code does continue.
    If I remove the Unload code popup1 will reappear at the end of my code.

    I tried to include Application.ScreenUpdating = False at the beginning of the code, but that's not it.

    Can anyone help me to solve this problem?
    Attached Images Attached Images

  14. #14
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: User form/ to show please wait

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

  15. #15
    Registered User
    Join Date
    02-14-2020
    Location
    Hungary
    MS-Off Ver
    2013
    Posts
    2

    Re: User form/ to show please wait

    Hi,
    I had the same problem. I have a "Please Wait" textbox in a userform that pops up upon workbook opens. There was delay a second or two between the window and the textbox appearance.
    My solution is:
    Userform1.show vbModeless
    Userform1.repaint

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1