Changing Name Range based on imported data
Selection.CurrentRegion.Select
selection.Name="Input_Range"
will do what you want and is much easier thatn using Names.Add
--
Regards,
Tom Ogilvy
"TeeSea" wrote in message
...
Data is being imported and fills a variable number of rows. I start by
determining the range of cells and then assign a name with the following
macro:
Range("A8").Select
Selection.CurrentRegion.Select
ActiveWorkbook.Names.Add Name:="Input_Range", RefersToR1C1:= _
"=Sheet2r!R8C1:R92C8"
The problem is I want to use this as a template and the range is set at
"=Sheet2r!R8C1:R92C8" and I want it to be the area selected by the
CurrentRegion function.
--
Thanks,
TeeSea
|