+ Reply to Thread
Results 1 to 4 of 4

Progress indicator/Loop help

  1. #1
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Progress indicator/Loop help

    Hi,

    I have put together the following code that duplicates rows and updates a progress bar userform. It works perfectly however the inefficiency of the progress bar code is really slowing down the run time, as the progress bar can update anywhere up to 15000 times. What I'd like to do is either optimise the progress bar calculation or even limit the number of times it refreshes.

    A way I thought of doing this is only calling the progress sub every time the percentage complete is a multiple of ten but I'm not sure how the best way of doing this would be, or if there is a much simpler/more efficient method. Any ideas? Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Progress indicator/Loop help

    Hi,

    Perhaps something like this
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Progress indicator/Loop help

    Hi,
    If you have large number of rows then your "pctCompl" will increase slowly.
    You could set some variable, lets say "tempCompl", set some value at the beginning of your code, lets say you wish to change Progressbar after 10% completed. tempCompl = 10.
    Then compare this temporary varuable with actual progress.
    Something like this

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: Progress indicator/Loop help

    Quote Originally Posted by xlnitwit View Post
    Hi,

    Perhaps something like this
    Please Login or Register  to view this content.
    Thanks. It does work - sort of. While pctCompl is between 4.5 and 5.4, 9.5 and 10.4 etc, it computes all lines.

    Quote Originally Posted by kasan View Post
    Hi,
    If you have large number of rows then your "pctCompl" will increase slowly.
    You could set some variable, lets say "tempCompl", set some value at the beginning of your code, lets say you wish to change Progressbar after 10% completed. tempCompl = 10.
    Then compare this temporary varuable with actual progress.
    Something like this

    Please Login or Register  to view this content.
    Cheers, this does seem to be the best option so far.

+ 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] Progress Indicator help
    By SUMIF in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-27-2016, 09:20 AM
  2. Progress Indicator
    By julhs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2016, 01:17 PM
  3. Progress Indicator Bar
    By abousetta in forum The Water Cooler
    Replies: 17
    Last Post: 10-01-2012, 03:34 AM
  4. Progress Bar Indicator
    By coneill0422 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2011, 07:18 PM
  5. Macro Progress Indicator
    By crs245 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2009, 02:37 PM
  6. Progress Indicator
    By excel_lover in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2009, 04:59 AM
  7. progress indicator problem
    By 77anders in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2009, 07:35 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