Create Class myCtrl of ActiveX as OleControlPick the ActiveX and save the class. Then replace the CREATEOBJECT() lines in your code with
loCtrl = NEWOBJECT("myCtrl","ActiveX.VCX")Some controls cannot be instatiated this way. In this case you need to create a form class, add the ActiveX control to the form, replace the CreateObject() lines with the form and then use loForm.OleControl1 (or whatever you named it) instead of the existing reference.