>I understand the newObject syntax, but I am unable to get the command to work.
>
>I have a class in a library I am trying to instantiate. I can successfully use CreateObject(). I would like to use NewObject as then I will not have to do the set classlib to work before it...
>
>Existing Code:
>
>This Works...
>SET CLASSLIB TO search.vcx ADDITIVE
>loFind = CREATEOBJECT(lcClass,This.ControlSource,Thisform)
>
>This does not work ( File 'C:\vfp6\master.phone_01' does not exist )
>loFind = NewObject(lcClass,"SEARCH.VCX",This.ControlSource,Thisform)
>I beleive its looking for the search.vcx somewhere...
>loFind = NewObject(lcClass,"SEARCH.VCX","MY.EXE",This.ControlSource,Thisform)
>* this bombs also
>Can someone help the the NewObject syntax...I have tried it several different ways and it is a mystery to me.
>
>I've tried this ( Function argument value, type, or count is invalid.)
>loFind = NewObject(lcClass,This.ControlSource,Thisform)
loFind = NewObject(lcClass,"SEARCH.VCX","",This.ControlSource,Thisform)
Cetin