P
Paul Silverman
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
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