0
I have a piece of code that is trying to overwrite the value in a named range, but I am getting <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 the "ActiveWorkbook.Range" line. Table1RowCount & Table1LastRowFixed are both named ranges with workbook level scope hosting constant values. I am trying to update one of them based on a condition. As you can see the Evaulate function works on both name ranges, but when I try to use the Range to update on of them I am getting the error.
Please note that I have tried "Thisworkbook.Range" and "Range" by itself without much success.
Any help is appreciated.
I have a piece of code that is trying to overwrite the value in a named range, but I am getting <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 the "ActiveWorkbook.Range" line. Table1RowCount & Table1LastRowFixed are both named ranges with workbook level scope hosting constant values. I am trying to update one of them based on a condition. As you can see the Evaulate function works on both name ranges, but when I try to use the Range to update on of them I am getting the error.
Please note that I have tried "Thisworkbook.Range" and "Range" by itself without much success.
Any help is appreciated.