Why does Excel expose an 'Evaluate' method at all?

Posted by jtolle on Stack Overflow See other posts from Stack Overflow or by jtolle
Published on 2010-04-15T18:07:56Z Indexed on 2010/04/15 18:43 UTC
Read the original article Hit count: 310

Filed under:
|
|
|
|

A few questions have come up recently involving the Application.Evaluate method callable from Excel VBA. The old XLM macro language also exposes an EVALUATE() function. Both can be quite useful. Does anyone know why the general expression evaluator is exposed, though?

My own hunch is that Excel needed to give people a way to get ranges from string addresses, and to get the value of named formulas, and just opening a portal to the expression evaluator was the easiest way. But of course you don't need the ability to evaluate arbitrary expressions just to do that. Application.Evaluate seems kind of...unfinished. It isn't very well documented, and there are quite a few quirks and limitations (as described by Charles Williams here: http://www.decisionmodels.com/calcsecretsh.htm) with what is exposed.

I suppose the answer could be simply "why not expose it?", but I'd be interested to know what design decisions led to this feature. Failing that, I'd be interested to hear other hunches.

© Stack Overflow or respective owner

Related posts about excel

Related posts about vba