BUG: Run-time Error "This Array is Fixed or Temporarily Locked"Last reviewed: January 23, 1998Article ID: Q176049 |
The information in this article applies to:
SYMPTOMSWith an EXE made from a Visual Basic project, you receive the following error:
Run-time error 10: "This Array is fixed or temporarily locked"The error does not occur when the Visual Basic project is run in the design environment.
CAUSEThis error occurs when your project uses the Microsoft Data-bound Grid control and you pass an element of a variant array to a procedure in a class module. This problem only occurs in Visual Basic 5.0 if the Visual Basic 5.0 Service Pack 2 is installed.
RESOLUTIONThere are several possible workarounds for this problem: - Dimension the array as a type other than Variant. For example, dimension the array as type String. -or-- Pass the element of the array by value.
-or -- Use a temporary variable to store and retrieve the value of the array element. For example, this code uses a variable "temp" to store and retrieve the value of the first element of "myarray": temp = myarray(1) MyObject.MyMethod temp myarray(1) = temp STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : vb5all VBKBEnv kberrmsg VS97FixlistSP2 Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |