+ Reply to Thread
Results 1 to 13 of 13

Progress indicator not showing when macro is excuted

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003,2007,2010,2013
    Posts
    10

    Post Progress indicator not showing when macro is excuted

    Hi All,

    I have a workbook that data get import through the import function in excel the data get manipulated where rows get clear leaving blank rows the workbook may contain over 20,000 rows. I have create a macro to delete blank rows. The macro work as I expected, but it show no progress indicator when run.

    I have done some research on how to show a progress indicator when the macro is run and come across with the following link http://spreadsheetpage.com/index.php...ess_indicator/ .

    When the macro is run the progress form is load and execute the Sub DeleteBlankRows in the background and the progress indicator form is showing in the screen is not updating. Can anyone be able to help me with this code. I have attached the workbook that contain the code.DATA_TEST.xlsm


    Sorry not sure on how to attached the code in this thread.

    Thank You,

    Eugene
    Last edited by eugh; 09-06-2013 at 01:07 AM.

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Progress indicator not showing when macro is excuted

    Hi Eugene,

    why don't you just display the % done in the status bar?
    On your test sheet, running a code to delete rows takes less than two seconds, so I wouldn't really go through all the effort to show a progress bar.
    I realize that's only about 6000 rows of data, but still - upping that to 30000 rows would still make it be done in less than 10 seconds

    Try this :
    Please Login or Register  to view this content.
    Please click the * below if this helps
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    09-11-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003,2007,2010,2013
    Posts
    10

    Re: Progress indicator not showing when macro is excuted

    Jasper,

    Thank for replying, I was looking to see if the progress indicator code could be implemented in the workbook I be given the workbook to users that get Impatiens when their don't see a graphical display. Yes my work sample I have attached contain only 6000 rows the master work may contain over 100000.

    I'm quite happy to run your code.

    Thank You

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Progress indicator not showing when macro is excuted

    Hi, eugh,

    maybe restrict the loop to only those cells in Column A which are empty (SpecialCells(xlCellTypeBlanks)) and loop through these instead of looping through all cells? Adding a new column with a formula and utilize Autofilter to delete the cells which fit in one go instead of a loop and delete the extra column at the end of the macro?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Progress indicator not showing when macro is excuted

    Holger made a valid point (which I also thought about, but I took the lazy road)

    Try this for speed :
    Please Login or Register  to view this content.
    Please click the * below if this helps

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Progress indicator not showing when macro is excuted

    Hi, JasperD,

    if we assume that a blank cell in Column A means that the entire row could be deleted:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    09-11-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003,2007,2010,2013
    Posts
    10

    Re: Progress indicator not showing when macro is excuted

    Hi HaHoBe,

    Thank You for your help, I confused with your code should it be replacing JasperD, Err1:?
    Running your code work but it not show any progress indicator the workbook that I'm testing contain more than 80000 rows how can I implement an progress indicator showing progess that the code is running.

    Please Login or Register  to view this content.
    Thank you again.

    Eugh
    Last edited by eugh; 09-08-2013 at 11:27 PM.

  8. #8
    Registered User
    Join Date
    09-11-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003,2007,2010,2013
    Posts
    10

    Re: Progress indicator not showing when macro is excuted

    JasperD,

    Thank You again, I'm confused should I replace your previous code all together or just
    Please Login or Register  to view this content.
    Eugh
    Last edited by eugh; 09-08-2013 at 11:01 PM.

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Progress indicator not showing when macro is excuted

    Hi, eugh,

    if you use the code I posted there is no need for an indicator as long as the areas for empty cells/blanks do not exceed 8192. Maybe test this code on a copy of the worksheet?

    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    09-11-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003,2007,2010,2013
    Posts
    10

    Re: Progress indicator not showing when macro is excuted

    Hi HaHoBe,


    HaHobe the workbook I be introducing the macro contain at least 80,000 rows that user import every month an manipulated the data leaving the blank cell can your code. Can your code be modify to a range of 80,000 rows?

    Thank You

    Eugh

  11. #11
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Progress indicator not showing when macro is excuted

    Hi eugh,

    itīs not a matter of rows to work on but a matter of matches to find. Each single cell of a blank will count for an area, and the number of areas may not exceed 8192. As I donīt know how many blanks are in you import you may break the code down to segments like
    Please Login or Register  to view this content.
    The Step number could be increased to a greater number but I choose 10,000 here so the maximum number of loop will be 105 if the worksheet is filled throughout. Due to the deletion of rows there could be a check amended to see if the end of the data set has been reached prior to the end of the loop. 80,000+ rows would mean 9 loops here instead of 80,000+ in your concept.

    Ciao,
    Holger

  12. #12
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Progress indicator not showing when macro is excuted

    Hi guys,

    Wouldn't my posted code work as well?
    (This would replace all other code)

    Please Login or Register  to view this content.

  13. #13
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Progress indicator not showing when macro is excuted

    Hi, Jasper,

    yes for all Versions from 2002 on but not with 2000 and earlier as they should delete the entire range and not only the visible cells. And even using the Autofilter may cause trouble if the areas exceed 8192.

    Ciao,
    Holger

+ 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. long running macro - progress indicator tips needed
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2012, 01:02 AM
  2. Progress indicator for macro that loops through each worksheet
    By gazza365 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-17-2011, 10:48 PM
  3. Macro Progress Indicator
    By crs245 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2009, 02:37 PM
  4. Progress Indicator
    By excel_lover in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2009, 04:59 AM
  5. [SOLVED] how to create a msgbox showing progress of macro
    By Macropod in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-15-2005, 10:30 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