When you run code that calls the Common Dialog Control (Comdlg32.ocx) on a computer other than the one where the code was developed, you may receive the following error message:
Run-time error 429: ActiveX component can't create object.
This problem can occur if the following conditions are true:
- The control is called from Visual Basic for Applications code by using the New CommonDialog command.
- The computer from where you are running the code has a run-time license instead of a design-time license for this control.
To work around this problem, wrap the control inside another control, such as a UserForm. To do this, follow these steps:
- In the Visual Basic Editor, add a UserForm to your project.
- Insert a common dialog control on the UserForm. For example, use the following code to call the common dialog control on the UserForm:
- Save the workbook.
Article ID: 281848 - Last Review: Jan 29, 2007 - Revision: 1