>How can do this? TIA
You can use EXECSCRIPT() function to execute several lines of code that you've put together in a string. Or, you can create a .prg file on the fly and run it (pretty much the same as EXECSCRIPT()).
Or, can even define a class definition in a .PRG file at runtime (DEFINE CLASS....), and use NEWOBJECT() to get an object from that definition.
Lot's of flexibility....
Is that the sort of thing your looking for?
Steve Gibson