Hi Frank,
well, the point is that I don't want the user into my code, but I want them
to be able to define routines to be applied to data that my tool manages.
Thanks so much!
Mike
: Hi
: I still don't see the benefit for your user. And YES you're in the
: 'parsing' business as you have to implement this function AsCode()
: In total you need something like (as you wanted to mix VBA + worksheet
: functions):
: - Program to read text files (which the user creates in a text editor
: without ANY syntax checking"
: - A 'parsing' algorithmn (search Google for 'Yacc' to get an idea about
: this)
: - A kind of pre-compiler to convert your text into VBA
: - somehow the result of this has to be put somethere. So you have to
: add some output routines
: So IMHO you're in the Parsing/Compiler business

: So why don't write VBA code directly?
: Maybe you can give an example what kind of functionality should be
: accessible for your user. There're probably other solutions for this
: --
: Regards
: Frank Kabel
: Frankfurt, Germany
: :>
:> Hi Frank....
:>
:> no, no... I am trying to *avoid* the parsing/compliler business...
: that's
:> the entire point of the exercise!
:>
:> Imagine where AsCode() is a function to intrepret strings as code:
:>
:> a = "nMyAddress = 142"
:> b = "msgbox nMyAddress"
:>
:> AsCode(a)
:> AsCode(b)
:>
:>
:>
:> if a and b are set by reading in lines from a text file, then the
: code will
:> be generated from the text file... (and if it crashes, then too bad
:

:>
:>
:> Mike
:>
:>
:> : Hi Mike
:> : you do not want to go in the 'parsing/compiler' business - don't
: you
:> :

:> : Though this can be done, this would be quite difficult to do and
: would
:> : (IMHO) require a large amount of code. This is NOT a small utility
:>
:> : For what do you want this (which VBA function could be required for
:> : your users) How should they enter the text file (you may add to
: your
:> : requirement list some syntax checking while editing/writing)
:>
:>
:> : --
:> : Regards
:> : Frank Kabel
:> : Frankfurt, Germany
:>
:> : :> :>
:> :> Hi all...
:> :>
:> :> perhaps a bit of an unusual notion... but I'm sure I'm not the
:> : first...
:> :>
:> :> is there a way to cause Excel to interpret a string variable as
: code?
:> :>
:> :> I'm thinking of allowing users of an excel tool to write a text
: file
:> : that
:> :> may contain standard excel formula and/or VBA code (minus flow
:> : structures).
:> :>
:> :> Possible? A better or different approach?
:> :>
:> :> Thanks in advance...
:> :>
:> :> Mike
:>