I am looping through each sheet in a workbook and selecting based on the last 5 characters in a sheet name.
All works as required, however, if I comment out the ".activate" line of my code then it runs on whatever the active sheet is.
My question: is 'with sheet' supposed to activate the sheet? If not, then what is the point of having 'with sheet' in the code if the code runs on whatever the activesheet is?
Edit: just to clarify, the activesheet is the sheet that is active at the beginning of the code. i.e. the code is looping through the sheets but the active sheet is not looping.
Bookmarks