XL: GP Fault Using LINE.PRINT with RightMarg Greater than 256Last reviewed: September 13, 1996Article ID: Q122333 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you run a version 4.0 macro that contains the LINE.PRINT function, you may receive a general protection (GP) fault in module EXCEL.EXE.
CAUSEThe LINE.PRINT function is used in the Microsoft Excel version 4.0 Macro Language to print the active worksheet using methods that are compatible with those found in Lotus 1-2-3. The following is one syntax of the LINE.PRINT function:
LINE.PRINT(command,setup_text,leftmarg,rightmarg,topmarg,botmarg,pglen formatted)The rightmarg argument above is the argument that specifies the size of the right margin measured in characters from the left side of the page. Anytime you use the LINE.PRINT function with the rightmarg argument set to a value greater than 256, you may receive a general protection (GP) fault when you issue the LINE.PRINT function with the command argument set to 1 (Syntax 1).
WORKAROUNDSTo avoid this problem when you use the LINE.PRINT function in a macro, use any of the following methods. Method 1: Use a rightmarg argument value of less than or equal to 256. Method 2: In Microsoft Excel version 5.0 and later, define the print area on the worksheet using the Page Setup command on the File menu, instead of using the Define Name dialog box. This problem only occurs when you define the name "Print_Area" on your worksheet without using the sheet name, such as "$A$1:$Z$1." STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCES"Function Reference ," version 4.0 pages 253-254
|
KBCategory: kbprg kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |