>>Basically, createobject() inside an executed script doesn't see the classes etc defined in the app. But it can see variables, functions, objects - one of which may be what's needed to create an object.
>
>
>I forgot to mention that this is an executable that I cannot change. So the only solution up to know is to create the popup thru code in the memo and then call it, it's basically a form with a combobox where they can choose a store and it will filter on that store, never done that but I imagine I can recreate the form with all the code (mainly in the combobox)?
Before you try that, see if execscript() can open the form as a table... just try and see if this works
use myform.scx
copy to tmp.scx
do form tmp
If it works, we've just created a copy of the form in the current folder. It would be better to do on getenv("temp") folder. I mean, I tried this and I got the form to run, but the environment in which the form runs may be weird - if it depends on something from within the app, it may not be accessible, unless it's a global and already instantiated; if it has any createobject() in it, it may break.
Your last resort is to take the form you copied out and generate its code using class browser - and build your .prg form based on that. The class browser generated code usually won't run as is, but is rather close to it.