>I created a custom class for my VFP 6.0 app that uses the MS Common Dialog to prompt for a file name to save data to. I am using Win2000. When the .EXE is run on other Win2000 machines and some NT machines it works OK. When it is run on Win95 and some other NT machines it generates the following error on the "CREATEOBJECT()" line of code.
>
>1426 : OLE error code 0x80040154: Class not registered.
>
>Has anybody had this problem? How do I fix it?
The odds are that the machines giving this answer may have an earlier version of the Common Dialog OCX file than you used in your class. To avoid this issue, distribute the proper version along with your other distribution files and install it as necessary using your installation tool; any of the Windows Installers I've seen, including Setup Wizard and the Visual Studio Installer, will handle installing ActiveX components and registering them as needed based on the version already present on the system - in Setup Wizard, you need to include the OCX in your distribution, tell the Setup Wizard to put it in Windows' system directory and that it is an ActiveX component that requires registration.