M
Mark Worthington
I am familiar with referencing Named Ranges in VBA, namely Set x =
Range("x"), where x=Sheet1!$A$1
However, I have defined a Named Constant in a worksheet, x=2. I have
=x in cell $A$1 (giving 2), but if I try to reference this in code
using the above Set statement, I get the very helpful error message :
Run-time Error '1004':
Application-defined or Object-defined error
If I then define a "normal" Named Range, y=Sheet1!$A$1, then Set x =
Range("y") works as expected.
Am I am trying something odd? A Named Constant or Range is really a
Named Formula, which all exist in Excel's memory, so I don't know why
one works while the other does not.
Any help would be much appreciated!
Mark
Range("x"), where x=Sheet1!$A$1
However, I have defined a Named Constant in a worksheet, x=2. I have
=x in cell $A$1 (giving 2), but if I try to reference this in code
using the above Set statement, I get the very helpful error message :
Run-time Error '1004':
Application-defined or Object-defined error
If I then define a "normal" Named Range, y=Sheet1!$A$1, then Set x =
Range("y") works as expected.
Am I am trying something odd? A Named Constant or Range is really a
Named Formula, which all exist in Excel's memory, so I don't know why
one works while the other does not.
Any help would be much appreciated!
Mark