+ Reply to Thread
Results 1 to 11 of 11

Using a Userform for a macro loading box?

  1. #1
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Using a Userform for a macro loading box?

    I setup a userform that simply has text that says "Please wait while data is loading..."

    I used this to position in properly
    Please Login or Register  to view this content.
    However, when the box pops up it stays and doesn't continue the macro until I close it, so I added False at the end of .Show False.

    Now it pops up and works properly however the box pops up blank with title only, the text in the box doesn't show. Any ideas?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a Userform for a macro loading box?

    Have you tried:
    Please Login or Register  to view this content.
    BSB

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Using a Userform for a macro loading box?

    Try it this way
    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  4. #4
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Using a Userform for a macro loading box?

    I think I tried vbModeless and it still didn't display the text, but I will try again tomorrow to confirm.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Using a Userform for a macro loading box?

    If the text's in the userform, it displays, if not it doesn't, if the text comes from elsewhere then you need to load the text to textbox of label for it to show.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Using a Userform for a macro loading box?

    "Please wait while data is loading..."
    Why is the data taking do long to load in the first place?
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Using a Userform for a macro loading box?

    @sintek: Yes I read that but IS it actually there?
    The OP says so but ... If it's there it should show up

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Using a Userform for a macro loading box?

    @Keebellah
    I actually was wondering why OP needs to let User know data is loading...What is the data that is taking so long to load...
    Could the data loading not be simplified to do away with the Message...

  9. #9
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,887

    Re: Using a Userform for a macro loading box?

    You could try forcing a repaint just in case:

    Please Login or Register  to view this content.
    Rory

  10. #10
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Using a Userform for a macro loading box?

    The reason the data takes awhile to load is because it's a huge macro that runs various thing then combines nearly 800k rows (in some cases).
    I get users asking me why it's frozen or it's not working etc etc. This is just to eliminate those questions.

    In many cases this file is updated daily and loads instantly but in many it may take 30 seconds or up to a couple minutes.

    I put the text directly in the UserForm using the text box on the Toolbox controls...is that the correct way? I will try repaint suggested by rorya as well.

    Quote Originally Posted by rorya View Post
    You could try forcing a repaint just in case:

    Please Login or Register  to view this content.

    This worked. Thanks everyone.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Using a Userform for a macro loading box?

    You could speed up the macro by setting screenupdating off and calculation to manual if there are many formulas.
    How are you invoking the form at what moment?
    Excel does have the tendency to show the 'not responding' text in the caption but that means that the Excel instance is waiting for Excel to complete whatever it's doing; this 'feature' started with Excel 2007 when Microsoft changed how the Office applications worked.

    What I would like to know is what YOUR macro code looks like.

    I would suggest something as follows:

    Please Login or Register  to view this content.
    Check the code in red for syntax, I typed it by head and did not check but it's the idea that counts

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Userform Not Loading
    By EvanJones2 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-13-2018, 06:49 PM
  2. Loading userform
    By tian0020 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2007, 01:57 AM
  3. [SOLVED] Loading a Userform
    By Jason Zischke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2006, 04:40 AM
  4. [SOLVED] Loading website from userform
    By Danny Boy via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2006, 12:15 PM
  5. Loading Userform
    By Steven Cheng in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2005, 03:20 PM
  6. [SOLVED] Loading UserForm gives error
    By Mats Samson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2005, 04:05 AM
  7. [SOLVED] Loading UserForm on start up.
    By Kobus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2005, 07:06 AM

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