PRB: Loading Controls from Array Gives Several Error Messages

Last reviewed: November 17, 1995
Article ID: Q138526
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

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

  1. Start a new project in Visual Basic 4.0. Form1 is created by default.

  2. Place the Picture control on Form1.

  3. In the Click event for the form, place the following code:

        Load Picture1(1)
    

  4. 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 reference words: 4.00 vb4win vb4all
KBCategory: kbprg kbprb kberrmsg
KBSubcategory: PrgCtrlsStd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.