Interesting. It only seems to work on the first use. After that, it gives the following error rather the range has blank spaces or not:
Run-time error '1004':
No cells were found.
I tried adding this bit to verify if there were blank cells or not before running the code and to clear the set variables, but it didn't help when blank lines were added back to the list:
I think I may have discovered part of the issue... even with "With Worksheets", this code runs off the active sheet which seems odd to me. When I went to another sheet in my workbook and inadvertently tested this code, it altered that sheet instead of the sheet it was supposed to. No matter, I Activated and Selected the proper worksheet and the code still only runs once. To get it to run again, I have to completely close the worksheet and reopen it. I've never seen this before.
Bookmarks