Quote:
> True...
> You can also use any of the following techniques to get a similar effect:
> - CallByName (VB6 only)
> - Function pointers
> - Interfaces (w/ the right setup)
There's one big problem with CallByName - it trashes the Error information.
I was trying to implement a Properties() method for my classes without
resorting to a large Select Case statement, and CallByName seemed like a
perfect solution until I found out that any errors occuring would not
provide normal error information, but only one of the generic
'Application-defined' or 'Automation' errors (I can't remember which). MS
has a KB article about this saying it is 'By Design' which means they're
either too lazy or too incompetent to fix it. The more I use VB, the more I
realize that the developers at MS who write it don't actually use it, or
else they'd fix a lot more of these annoying little problems.
Jeff
Quote:
> Also note that VBA (not VB) includes the Eval function without needing the
> Windows Scripting host.
> It is also fairly easy to write an expression evaluator for arithmetic /
> other simple functional expressions. I have also seen this kind of code
for
> free. Let me know if I can be of any further assistance
> Chase Saunders
> Burgess Inc.
Quote:
> >>Is there a similar fucntion that works like Execute in VBScript or Eval
in
> JScript?
> >Charles,
> >No. But you can add a reference to MS Scripting runtime, and use the
> >VBScript Eval method from VB.
> >Mattias
> >__________________________________________________
> > VB+ http://hem.spray.se/mattias.sjogren/
> > Please send questions/replies to the newsgroups