+ Reply to Thread
Results 1 to 3 of 3

Progress Bar for macro

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Progress Bar for macro

    Hi, I have a macro called GetAttach in Module1 of attached workbook, for which I'd like to have progress bar indicating the macro progress. I have already added the user form, but I am quite unsure on how to assign this ProgressBar to my macro. I'd appreciate some help, thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Progress Bar for macro

    What you need to do with that progress bar is change the width of the 'BarColor' label to indicate how far it's gotten. If you have a numbered loop anywhere in your macro (for example a FOR NEXT loop that counts down rows of data) then you simply divide the max width of the label (264 in this case) by the total number of rows and then multiply it by the row number you're on.

    For example, in my code:

    Please Login or Register  to view this content.
    And every time the loop cycles:

    Please Login or Register  to view this content.

    If you don't have a numbered loop you can use then you'll just have to put hard coded width updates at various points in your code.
    Last edited by BellyGas; 08-07-2017 at 09:37 AM.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Progress Bar for macro

    Rule 08: Cross-posting Without Links

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Message when VBA works; Be patien etc..; Is possible progress bar on progress information?
    By martin81 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-30-2016, 08:43 AM
  2. Replies: 1
    Last Post: 08-06-2014, 10:29 PM
  3. Macro with YES/NO plus progress bar
    By albert28 in forum Excel General
    Replies: 1
    Last Post: 03-13-2014, 03:28 AM
  4. Bar chart or bar graph for construction progress physical progress
    By pvsvprasadcivil in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 01-08-2014, 02:40 AM
  5. Bar chart or bar graph for construction progress physical progress
    By pvsvprasadcivil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2013, 12:41 PM
  6. To add progress bar in a macro
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2010, 01:58 PM
  7. Macro Progress Bar
    By pr4t3ek in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-27-2008, 07:51 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