Excel Row Select in VBA
Excel Row Select in VBA
(OP)
This works by hand and is the same as the macro recorder but it doesn't work when I try to use it.
Range("EG3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
The rows are filtered and the first group of rows is blank which is what prompted the double range select; it selects just the blanks including the first non-blank cell it comes to. I can hard code a fixed range but I'd prefer something more elegant which is where you guys come in.
Range("EG3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
The rows are filtered and the first group of rows is blank which is what prompted the double range select; it selects just the blanks including the first non-blank cell it comes to. I can hard code a fixed range but I'd prefer something more elegant which is where you guys come in.





RE: Excel Row Select in VBA
CODE
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Range(Selection, Range("EG3")).Select
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Excel Row Select in VBA
I have another ? When the macro closes a file I get a "Do you want to keep the clipboard stuff" decision window. How do I get the code to answer that? I don't want to pick up the mouse to click no.
RE: Excel Row Select in VBA
Application.CutCopyMode = False
at the end of the macro. This is a good habit anyway.
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Excel Row Select in VBA
Many thanks,
Roger