PRB: Potential Problem with Reloading a UserControl File with an Add-In (258233)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q258233 SYMPTOMS
You have a Visual Basic add-in component that calls the VBComponent.Reload method of the Visual Basic Add-In model to reload a UserControl (.ctl) file. If an instance of the UserControl is currently sited on a container (form or control) that is part of the project, you get the following error message when the Reload method is called:
Run-time error '5':Invalid procedure call or argument.
CAUSE
This behavior is by design. The Reload method needs to unload (remove) and then load (add) the .ctl file. Because an instance of the control is on a container, the removal of the control from the project is not allowed. This is analogous to the situation in which you site a UserControl on a form, and then try to remove the .ctl file manually, in which case you get the following error message:
Can't remove control or reference; in use.
Modification Type: | Major | Last Reviewed: | 7/10/2001 |
---|
Keywords: | kbAddIn kbDSupport kbprb KB258233 |
---|
|