PRB: Run-Time Error '373' or '-2147417848(80010108)'
Article ID: 192129
Article Last Modified on 5/13/2003
APPLIES TO
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 6.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q192129
SYMPTOMS
When passing a form to a public procedure of a compiled UserControl, you
receive one of the following error messages:
Run-time error '373': This interaction between compiled and design
environment components is not supported.
Run-time error '-2147417848(80010108)': Method 'xxx' failed
The first error is received if running a Visual Basic 6.0 project, the
second applies to Visual Basic 5.0 projects.
CAUSE
Forms and controls are private objects to the Visual Basic project that
created them. Therefore, they should not be passed as parameters to
procedures outside the project. Although you can work around this error
message by adding the UserControl project and the test client project to
the same project group, passing forms and controls outside the project that
originally created them may have unpredictable side effects and is strongly
discouraged.
RESOLUTION
There are two possible resolutions to avoid this behavior:
- Do not pass forms or controls outside a project.
- Add the UserControl and the client projects to the same project group.
STATUS
This behavior is by design.
Additional query words: kbdss kbDSupport kbVBp kbCtrlCreate kbVBp500 kbVBp600
Keywords: kbprb KB192129