I am trying to overwrite the value in a named range.
I get
Object doesn't support this property or method
Sub CheckStuff()
If Evaluate("Table1RowCount") > Evaluate("Table1LastRowFixed") Then
ActiveWorkbook.Range("Table1LastRowFixed").Value = Evaluate("Table1RowCount")
End If
End Sub
The error occurs at ActiveWorkbook.Range.
Table1RowCount & Table1LastRowFixed are named ranges with workbook level scope hosting constant values. I am trying to update one of them based on a condition.
The Evaulate function works on both name ranges, but when I try to use the Range to update one of them I get the error.
I tried Thisworkbook.Range and Range by itself.
ActiveWorkbook.Range: ARangeis a property of aWorksheet, not aWorkbook.ActiveWorkbook.Names("Table1LastRowFixed").RefersTo=Evaluate("Table1RowCount")