Hi all,
I have been re-using some macros for a while but I know very little about them. I recently changed laptops and now I am using Excel 2016 (I was using 2019 before) and macros are returning a Run time error 1004 for application defined or object defined error.
The error happens in this extract:
It seems like the listNamedRanges formula, which is defined in the Name Manager as
is not recognised as a range in VBA but as an Integer; see the Watch window schreenshot below:
I already tried to modify the offset, currently used to extend the range when list is extended, so that it takes the range instead of using OFFSET but code is pretty heavy and it results in other errors.
I wonder if there is a way to tell the macro these formulas defined in the Name Manager are Ranges and not Integers. I will otherwise try in a different laptop with later versions of Excel.
Thanks!
I have been re-using some macros for a while but I know very little about them. I recently changed laptops and now I am using Excel 2016 (I was using 2019 before) and macros are returning a Run time error 1004 for application defined or object defined error.
The error happens in this extract:
VBA Code:
Set rngNames = ThisWorkbook.Names("listNamedRanges").RefersToRange
It seems like the listNamedRanges formula, which is defined in the Name Manager as
Excel Formula:
=OFFSET(DevSettings!$G$101;1;0;DevSettings!$E$184;1)
I already tried to modify the offset, currently used to extend the range when list is extended, so that it takes the range instead of using OFFSET but code is pretty heavy and it results in other errors.
I wonder if there is a way to tell the macro these formulas defined in the Name Manager are Ranges and not Integers. I will otherwise try in a different laptop with later versions of Excel.
Thanks!