Dynamically Adding Controls - Error
I am dynamically adding an ActiveX control to a UserForm using the call:
Set MyObject = Me.Controls.Add("ControlName.ProgID", "MyName")
where MyObject is dimmed to an Object.
When I close Excel, it crashes, with the standard "Microsoft Excel has encountered a problem and needs to close. We are sorry for the inconvenience" error message.
Is there something I need to do to unload this control on UserForm.Terminate?
Thanks,
Paul
|