+ Reply to Thread
Results 1 to 3 of 3

VBA Loop counter

  1. #1
    Registered User
    Join Date
    08-01-2019
    Location
    Winnipeg
    MS-Off Ver
    Office 365
    Posts
    19

    VBA Loop counter

    Hi all,
    I am currently using the following for next loop for all rows in one one excel sheet
    I am wondering if it is possible to add some code so that excel will display loop counter at the right lower corner of excel window, adjacent to the Zoom bar.
    I am using Office 365.
    A loop counter will help me understand number of rows left to process and also a rough idea of time it might take to loop to end.

    thanks to all of you

    Siva

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Loop counter

    You can display it in the status bar, but not quite next to the Zoom.

    Why are you looping through over a million rows instead of just the rows being used? This will waste a huge amount of time processing rows with no data. I was going to fix that but I don't know what your real data looks like.

    Variable "row" is declared as Long but it must be an Object or Variant so I declared it as Range. I do not know how you got this code to compile.

    I strongly recommend to everyone that they use Option Explicit and declare variables. Doing so prevents a lot of bugs and runtime errors.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-01-2019
    Location
    Winnipeg
    MS-Off Ver
    Office 365
    Posts
    19

    Re: VBA Loop counter

    Hi All,
    Thanks a lot for your help
    I learned something today.

    thanks

    SG

+ 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] Counter and a Loop
    By bnevena in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2018, 12:51 PM
  2. How to Reference a Loop Counter
    By Bensley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2018, 03:19 AM
  3. Display a loop counter
    By TBurgum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2018, 04:10 PM
  4. [SOLVED] Reducing the value of a loop counter
    By danielexcelvba in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2017, 12:29 PM
  5. [SOLVED] Counter in a loop
    By jonathanrgz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2013, 05:46 PM
  6. loop counter not recognised
    By Dave H9 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2011, 02:53 AM
  7. How can I avoid changing a loop counter within a loop?
    By broro183 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2009, 07:59 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