+ Reply to Thread
Results 1 to 7 of 7

Help with VBA code to show please wait message

  1. #1
    Forum Contributor
    Join Date
    06-17-2014
    Location
    london
    MS-Off Ver
    365
    Posts
    398

    Help with VBA code to show please wait message

    Dear Alll

    I would appreciate your help with the follwoing problem. I am fairly new to VBA.

    I have created a worlsheet called selection where user can choose their name and click on select button to direct them to another sheet called Reports.

    Reports worksheet contains tyhree different Pivot Tab;les which are generated using Power Pivot.

    The code I have done so far is when user click on Slect it clears all slicer filters then based on the name selected in chooses the right Slicer filter based on the Name and shows the result for that person.

    What I need to do is when a user selects their name and click on Select button a message appears in a userform I have s-created (called Userform1) which displays a messahe saying "Please wait" and once the pivot table updating and slicers selection is complete then it unloads the user form and shows the appropriae report.

    I have a code which loads the user form but nothing happens until I actually close the user form and the the updating strats.

    Can someone please help me with the code which oads the user form (or windows pop up) and waits untiul all the slicer functios and poer pivot updating completes before it shows the result of the selection.

    Any help is apprecaite it.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with VBA code to show please wait message

    Instead of a UserForm, use a textbox or shape (Insert\Shapes). At the start of the code, make the shape visible. At the end of your code, hide the shape.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    06-17-2014
    Location
    london
    MS-Off Ver
    365
    Posts
    398

    Re: Help with VBA code to show please wait message

    Hi
    Do I create a text box on the first sheet. My sheet is called Selection.

    When I copy the code I get an error saying Invalid Procedure or call argument.

    Do I create a text box, then not surehot to name this and where do I place the text box.

    Any help is appreciate it

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with VBA code to show please wait message

    Put the Text Box with the text "Please Wait" on the "Selection" sheet that has your Select button.

    How to Insert a Text Box into Excel

    Add the code from Below to your Select button procedure. The code assumes your text Box is called "Text Box 1". You can change the name to suit. The code will unhide the text box; continue to do your pivot table "stuff'; then rehide the text box when your pivot table code is done.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-17-2014
    Location
    london
    MS-Off Ver
    365
    Posts
    398

    Re: Help with VBA code to show please wait message

    This works absolutley great. Thank you so much for your help. I had spend weeks trying to figure somehting out.

    Thanks you again

  6. #6
    Registered User
    Join Date
    03-25-2004
    Posts
    54

    Re: Help with VBA code to show please wait message

    Hey, guys.

    I know this is an old topic, but I've been searching for such thing for a while and, after a lot of research, I ended up creating my own method.

    I would really like to share this with you all guys, just in case someone else needs it as well.

    I hope you like it.

    Cheers.
    Attached Files Attached Files

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Help with VBA code to show please wait message

    Quote Originally Posted by brunces View Post
    Hey, guys.

    I know this is an old topic, but I've been searching for such thing for a while and, after a lot of research, I ended up creating my own method.

    I would really like to share this with you all guys, just in case someone else needs it as well.

    I hope you like it.

    Cheers.
    Thanks for sharing
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. trying to code a way to have a message box show the value of a cell
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2015, 08:09 PM
  2. [SOLVED] VBA code to show to message box between time range
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2015, 06:00 PM
  3. [SOLVED] Excel VB code. Message pops up while code running asking question. Code must not wait.
    By Heinrich Venter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2014, 06:10 AM
  4. Macro to show please wait message during macro is running
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2014, 04:02 PM
  5. [SOLVED] how to add counter in msgbox to show remain times the message will show vba code
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-25-2013, 06:46 AM
  6. Please Wait Message Box wont show label and colour formating
    By nods in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-09-2010, 11:15 AM
  7. show "Please Wait" message
    By matrex in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-11-2009, 08:23 PM

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