Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
stu stu is offline
external usenet poster
 
Posts: 4
Default Range Selection


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)).Sele ct

produce graph etc.....

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


Any Help Would be appreciated.


Regards

Stu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Range Selection

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

"stu" wrote in message
s.com...

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)).Sele ct

produce graph etc.....

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


Any Help Would be appreciated.


Regards

Stu



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range selection Naveen Excel Discussion (Misc queries) 3 October 9th 07 02:34 PM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"