Microsoft KB Archive/138526

= PRB: Loading Controls from Array Gives Several Error Messages =

Article ID: 138526

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Enterprise Edition

-



This article was previously published under Q138526



SUMMARY
In Visual Basic 3.0, attempting to load any control as a new element of a control array when the control is not part of a control array consistently gave the error message "Object not part of an array." In Visual Basic 4.0, the error message can vary depending on the type of control being used.



STATUS
Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The following table shows some of the error messages for the controls if a new member of a control array is loaded when the control is not part of an array. Other controls exhibit one of the error messages below but there is no consistency between the error message and type of control. Control   Error Message --

Command   Wrong Number of arguments or invalid property assignment Button

Picture   Type Mismatch Control

OLE       Invalid use of property Control

Video     Object doesn't support this property or method Clip

Steps to Reproduce Behavior
 Start a new project in Visual Basic 4.0. Form1 is created by default. Place the Picture control on Form1.  In the Click event for the form, place the following code: Load Picture1(1)  Run the program by pressing the F5 key. Click the form, and an error message will be generated. It is appropriate that an error message is generated, but the message is not consistent from one control to another.

Additional query words: 4.00 vb4win vb4all

Keywords: kberrmsg kbprb KB138526

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.