oDlg = Createobject("GetFileEx") oDlg.GetFile() ? oDlg.oCDC.OBJECT.FileName RETURN DEFINE CLASS GetFileEx AS form Left = 100 && Set Dialog Position by positioning the form Top = 100 && Set Dialog Position Name = "GetFIleEx" DoCreate = .T. Visible = .F. ADD OBJECT oCDC AS OleControl WITH ; OleClass = "MsComDlg.CommonDialog" PROCEDURE GetFile() Thisform.oCDC.ShowSave() ENDPROC ENDDEFINEKeep in mind that you'll have to either drop control on a form or subclass it in a visual class. See BUG: License Error with ActiveX Control Added at Run-Time mskb #192693.