XL5: GP Fault Copying, Moving, or Scrolling Visual Basic Module

Last reviewed: September 12, 1996
Article ID: Q120721
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c

SYMPTOMS

In Microsoft Excel, when you copy or move a Visual Basic module, or when you scroll the module that you moved or copied, you receive a general protection (GP) fault.

CAUSE

This behavior occurs when the module contains multiple Type statements, and a ReDim statement that dimensions an array as one of the user defined types. If you delete one of the Type procedures, and you then copy or move the module (to another workbook, or to another location in the same workbook), you receive a GP fault in module VBA.DLL.

The problem occurs when the ReDim statement is compiled again in the new workbook. The GP fault occurs either immediately after you move or copy the module (if the ReDim statement is contained in the first screen of the module) or when you scroll in the module after moving or copying as soon as the ReDim statement appears on the screen.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows NT, version 5.0.

MORE INFORMATION

A user-defined data type is any data type you define using the Type statement. User-defined data types can contain one or more elements of any data type, array, or a previously defined user-defined type.

You can use the ReDim statement to declare dynamic-array variables and allocate or reallocate storage space.

REFERENCES

For more information about the ReDim Statement, choose the Search button in the Visual Basic Reference and type:

   ReDim

For more information about a User-Defined Data Type, choose the Search button in the Visual Basic Reference and type:

   Type


KBCategory: kbprg
KBSubcategory:

Additional reference words: 5.00 5.00c gpf 000B:0F15



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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.