Define Names / RefersToRange
What do you mean by "the code fails" - do you get a run-time error?
Does the line execute, but no assignment take place?
Is your name defined as a worksheet-level name?
In article ,
"Andre Achtermeier" wrote:
hi,
i defined a Name "MyName" like
=locACTIVE_Template!$P$49;locACTIVE_Template!$P$86
in VBA i wrote
Dim rng As Range
Set rng = ActiveWorkbook.Names("MyName").RefersToRange
but the code fails and the RefersToRange is nothing.
any idea?
|