I am guessing that you meant the code line I highlighted in red to be this instead...
Selection.End(xlDown).Offset(1, 0).Select
Since you didn't post all your code, I cannot rewrite it for you because it ends by selecting a cell, but I would point out that it is rarely necessary to select cells in order to work with them. Whenever you see yourself writing something like this...
Range(..).Select
Selection.something
you can write it like this instead...
Range(..).something
Think about it... what does Selection.something mean? It means do "something" with the object you selected. But what is that object... it is the range you selected in the code line above... so you might as well work directly with the original object instead of working with a different object that references it. In effect, you already knew this because in your code, after you did this...
Range("B3").Select
you wrote this...
If Range("B3").Offset(1, 0) = "" Then
instead of writing this...
If Selection.Offset(1, 0) = "" Then





Reply With Quote
Bookmarks