XL5: GP Fault Using PATTERNS Formula with Cell SelectedLast reviewed: September 12, 1996Article ID: Q119571 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel version 5.0, if you run a MS Excel 4.0 macro that contains the PATTERNS formula, you receive a general protection (GP) fault if a cell on a worksheet or macro sheet is selected.
CAUSEThis behavior only occurs if you use one of the syntax forms of the PATTERNS formula for a chart item, or object, while a cell is selected on a worksheet or macro sheet. The problem occurs because the syntax forms of the PATTERNS formula for a chart item or object contain up to 12 arguments, while the syntax form for a cell contains only 4 arguments. If you use one of the syntax forms of the PATTERNS formula that contain more than 4 arguments, while a cell is selected, you receive a GP fault.
WORKAROUNDSTo avoid receiving a GP fault when you use the PATTERNS formula, do either of the following:
A1: =WORKBOOK.SELECT("Chart1","Chart1") A2: =SELECT("Plot") A3: =PATTERNS(0,1,8,3,FALSE,0,1,2,2,FALSE,FALSE,FALSE) A4: =RETURN() STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in a later version of Microsoft Excel. In Microsoft Excel version 5.0c, if you use the incorrect syntax form of the PATTERNS formula while a cell is selected, you receive a macro error instead of a GP fault.
REFERENCESFor more information about PATTERNS, choose the Search button in Microsoft Excel Macro Functions Help and type:
PATTERNS function |
KBCategory: kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |