I am currently trying to copy cells from one book to a new workbook. I then
name that group of cells in the new workbook. This is repeated multiple
times. This would work for me if the copying and pasting was to remain the
same, but this is not the case. I am finding that the new named range is
remaining in the same area even though the code that the name is supposed to
referance is elsewhere
PLEASE HELP!!
Heres my sample code
Windows("Brick Block Takeoff.xls").Activate
Application.Goto Reference:="REBAR"
Selection.Copy
Windows(filenameTakeoff & ".xls").Activate
Application.Goto Reference:="start"
Selection.Insert Shift:=xlDown
Application.Goto Reference:="start"
ActiveCell.Offset(-7, 0).Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Names.Add Name:="START1", RefersToR1C1:="=Sheet1!R20C1"
ActiveCell.Offset(6, 6

.Range("A1").Select
ActiveWorkbook.Names.Add Name:="FINISH1", RefersToR1C1:="=Sheet1!R26C69"
ActiveCell.Offset(-6, -6

.Range("START1:FINISH1").Select
ActiveCell.Activate
ActiveWorkbook.Names.Add Name:="REBAR190", RefersToR1C1:= _
"=Sheet1!R20C1:R26C69"
I need to find out how to change the RefersToR1C1:="=Sheet1!R26C69" to
something that isnt fixed in place. This way if i do insert something before
this group of cells it will still name the right range of cells.
Archived from group: microsoft>public>vb>syntax