LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Redefining a new Range area

Hi Folks,
I'm creating a macro where, each time it's run, I have to delete and
redefine a range (called List) which keeps growing.

I recorded it as follows:-
ActiveWorkbook.Names("List").Delete
Sheets("Database").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="List", RefersToR1C1:= _
"=Database!R1C1:R3781C6"

In the macro, the range is fixed at row 3781, but of course this will grow.

Is there some VBA code I can plug in which will select the entire range,
redefining the size as the range grows?

Thanks,

Paul Silverman
Melbourne Australia


 
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
SUMIF with area that is not a range lwsnbaker Excel Worksheet Functions 2 March 12th 10 03:49 PM
Redefining the $ icons format todd Excel Worksheet Functions 5 September 6th 08 11:10 PM
Print area/range Mike D. Excel Discussion (Misc queries) 2 June 30th 05 07:07 PM
Redefining Styles Grant Reid Excel Programming 1 July 19th 04 02:10 PM
Find Used area of a range MDW[_2_] Excel Programming 2 February 18th 04 02:08 AM


All times are GMT +1. The time now is 03:44 AM.

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

About Us

"It's about Microsoft Excel"