+ Reply to Thread
Results 1 to 6 of 6

Make label visible once macro finishes run

Hybrid View

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Make label visible once macro finishes run

    Hi Gurus,

    In my spreadsheet I have 6 macros that do what I need. All 6 macros are running in a sequence and take a minute to complete. What I am trying to achieve here is something like a Completion Status message while user waits for all macros to complete. So I have created a modeless userform with two columns of labels on, 6 labels in each column. First (left) column of labels represent my 6 macros (tasks), and the right column labels are labeled "OK". Those "OK's" are set to visible = False, and I want those "OK's" to go visible = True (one by one) whenever each task has been completed.

    How do I achieve this? All 6 macros are called by a single button click.

    Any help will be much valued and appreciated!

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Make label visible once macro finishes run

    UserFormName.LabelcontrolName.Visible = True
    With the appropriate names for the Userform and Label substituted.

    Suggested without the benefit* of seeing your existing code - but that, generally, is how it is done.

    *(Even if you integrate that line into your code am willing to bet your next post says all the labels appear at the end rather than when set visible)
    Last edited by cytop; 04-27-2017 at 07:20 AM.

  3. #3
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Make label visible once macro finishes run

    Also, how would I make label caption variable, say when macro starts, label caption is "In progress", when macro completes then it goes to "OK"?

  4. #4
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Make label visible once macro finishes run

    Hy cytop, you have just broken the world record of the time in responding!

    Your suggestion is pretty obvious and I have tried this already but it didn't work. I spent all day yesterday trying LabelcontrolName.Visible = True (without UserformName in front) but failed.

    It did work, thanks for your time!

  5. #5
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Make label visible once macro finishes run

    UserFormName.LabelcontrolName.Caption = "Go get a coffee..."
    After making sure it is visible to start with...

    (Still willing to bet you are going to say they do not update - answering specific questions about existing controls like this is guesswork without seeing a copy of the workbook)

  6. #6
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Make label visible once macro finishes run

    I was about to say it didn't work, but forgot to put Userform1.Repaint after the code. All good now, works. Thanks a lot!

+ 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] Macro to scroll to activecell and make visible in middle of screen
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 02:38 PM
  2. a macro has to make visible a new macro-button
    By Xavier Derille in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-16-2015, 03:15 PM
  3. Make macro button visible/invisible as per user name
    By nayanthara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2014, 03:46 AM
  4. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  5. Label is visible before enabling macro even though its visibility was set to false.
    By Sangram Bhosale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-16-2012, 07:43 AM
  6. Macro to Hide/Make Visible Pivot Items
    By az! in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2011, 06:18 AM
  7. [SOLVED] Macro finishes faster when left clicking during execution
    By Martin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2006, 06:50 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