BUG: Error 10 Attempting to ReDim or Erase an Array (187553)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q187553 SYMPTOMS
When using arrays of user-defined types (UDTs) with a With statement inside
a For loop, Visual Basic will not unlock the array when exiting the loop
with an Exit For statement. If you attempt to re-dim or erase the array,
the following run-time error is received:
Run-time error 10
This array is fixed or temporarily locked
RESOLUTION
Avoid using Exit For inside a With statement. A GoTo statement should be
used instead.
NOTE: Be sure that the End With statement is executed. If the statement is not executed, you will receive the above error message.
STATUS
Microsoft 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.
REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
176049
: BUG: Run-time Error "This Array is Fixed or Temporarily Locked"
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbbug kbnofix KB187553 |
---|
|