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

ID: Q120721

5.00 5.00c WINDOWS kbprg

The information in this article applies to:

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

Version           : 5.00 5.00c
Platform          : WINDOWS

Last Reviewed: September 14, 1996