Range Selection

S

stu

Hi

I have a sheet of data arranged in blocks. These blocks can vary in
size both by row and column. I have a search routine that finds the
data required but then I would like it to select to the last row,
column so that it can be use to create a graph.


there is what I have so far

Do the search
found data then set active cell

Range(ActiveCell, Range(ActiveCell).End(xlToRight).End(xlDown)).Select

produce graph etc.....

But when I run the rang Line I get error 1004.


Any Help Would be appreciated.


Regards

Stu
 
B

Bob Flanagan

Stu, for some reason vba doesn't like Range(activecell). The following
works:

Range(ActiveCell, ActiveCell.End(xlToRight).End(xlDown)).Select

Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
Top