Msg#: 3947478 posted 9:04 am on Jul 8, 2009 (gmt 0)
hi DrDoc it looks like a type prob to me. Have you tried casting the ThisWorkbook.Names("NameOfRange").RefersToRange.Value to a string...something like if cstr(ThisWorkbook.Names("NameOfRange").RefersToRange.Value) = "foo" then blah..blah..blah else
Msg#: 3947478 posted 4:42 am on Jul 9, 2009 (gmt 0)
Well, turns out that when the code was run as a function, or executed by a function, it would not work. Having it as a normal sub that triggers based on a given condition (even if said condition is triggered by a function), it works.