I have a named range. The cell in this range holds the cell reference of the last open cell in a list of data on another sheet. When I try to call that reference from the named range in my code, I get an error.
This works;
When I try to replace the "B6" with the range name "DataRow" which has the text B6 in it I get an error Run time error select method of range class failed.
How can I use the value in the named range as my cell reference?
This works;
Code:
Sheets("Summary").Select
Range("B3:O3").Select
Selection.Copy
Sheets("Data").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
When I try to replace the "B6" with the range name "DataRow" which has the text B6 in it I get an error Run time error select method of range class failed.
Code:
Sheets("Summary").Select
Range("B3:O3").Select
Selection.Copy
Sheets("Data").Select
Range("DataRow").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
How can I use the value in the named range as my cell reference?