+ Reply to Thread
Results 1 to 13 of 13

simplistic Progress bar

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

    simplistic Progress bar

    Hi All

    Has anyone got a very simplistic Progress bar I can make use of to incorporate into a looping code...
    Have googled and all seem so confusing...

    PS making use of a userform or Labels and Frames...

    And pretty please detailed step by step how to make use of it...
    Last edited by sintek; 12-20-2019 at 12:12 PM.
    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!!!

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: simplistic Progress bar

    used this for something earlier in year
    Attached Files Attached Files

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

    Re: simplistic Progress bar

    Awesome...
    Tx nigelog...

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: simplistic Progress bar

    Glad to help

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

    Re: simplistic Progress bar

    Came across a very simplistic method and adapted...Just thought I'd share...
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi sintek !

    This kind of progress bar code is good enough only for small data / procedure
    but for bigger ones it dramatically lengthens the procedure execution time each time the user form is updated !

    In your example it is refreshed 50 000 times but for a % from 0 to 100 it really needs to be refreshed only a hundred times,
    the reason why the better is to test if the next % level is reached before to update it …

    As some moderators can badly understand my will : that's not any sarcasm, just an obvious advice, direction, reminder, …

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

    Re: simplistic Progress bar

    Hi Marc L

    Thanks for input...Must add my procedure is a matter of 150 file opens, few minor calculations which takes 3 min ... with the proposed progress bar it only increases the processing time by a few seconds...

    May I as that you please suggest a alternative for larger datasets...So others can benefit...Tx

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Optimizing …


    As the Idea is to just do something if the next % is reached :

    • Amend the Type of variable CurrentProgress as Byte or Integer.

    • Amend its calculation * 100 … (So the variable ProgressPercentage is useless now !)

    • Add a variable for the next % to reach :
      as starting from 0 the variable P must be initialized to 1 at the beginning of the procedure.

    • Add a condition to the update & refresh (DoEvents) : If CurrentProgress >= P Then

      Within this If block, do not forget to increase P by 1 for the next update to reach.

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

    Re: simplistic Progress bar

    Hey Marc...Hit a blank...
    A favour yoda asks...Implement you will...
    Last edited by sintek; 12-21-2019 at 12:05 PM.

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    I need to grab & connect an Excel computer, wait for a little short while …

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool

    Try the revamped workbook below …

    Notice without 'Pause statements' it's an instant 100% reached but you can see the benefit as it is !
    Attached Files Attached Files

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

    Re: simplistic Progress bar

    Fantabulous Marc...You are a star...

  13. #13
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Thumbs up Re: simplistic Progress bar


    Thanks sintek for this unexpected rep' ! Just an easy logic : update only if needed as 100 updates are faster than 50 000 …

+ 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. [SOLVED] Progress Bar Down from Existing Progress Bar Up
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-06-2014, 05:05 PM
  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. old, simplistic, and rarely posted
    By Tennessee33 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-14-2012, 04:56 AM
  7. [SOLVED] NEED Help - How to capture the Event's progress in Progress Bar
    By Sriram in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2006, 07:10 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