Worksheet Loop

  • Can't figure out how to get the worksheet loop to advance to the next sheet. The way code is written currently loops the procedure on the same worksheet. What am I missing here?


  • Re: Worksheet Loop


    Fixed it. Thank you for anyone who took the time to review my post. Needed to activate each sheet on the loop.
    The new code is:


  • Re: Worksheet Loop


    You don't need to activate the sheet, and it is recommended you don't.


    2 main reasons:
    Code executes faster
    You have to explicitly refer to a sheet, avoids those errors where the code expects a certain sheet to be active, but it's not.


    Note the 'With' and the dot notation in front of Cell references. That's basically a shorthand that says anything after the dot is assumed to be a child of the last object referenced by a 'With'