No formal schooling, 95% of what I know is from the kind people at Mr. Excel. So this may be someone one should learn in Excel 101, but I've missed it.
Why does this work:
Dim LastRow As Long
Dim LastCol As Integer
LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
But this does not work?
Dim rng_HeaderRow As Range
rng_HeaderRow = Range("A1", Cells(LastCol))
Range("A1", Cells(LastCol)).Name = "rng_HeaderRow"
Works but then I have to delete the name or make the named range a worksheet range
TIA
Ron
Why does this work:
Dim LastRow As Long
Dim LastCol As Integer
LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
But this does not work?
Dim rng_HeaderRow As Range
rng_HeaderRow = Range("A1", Cells(LastCol))
Range("A1", Cells(LastCol)).Name = "rng_HeaderRow"
Works but then I have to delete the name or make the named range a worksheet range
TIA
Ron