GP Fault Using LINE.PRINT with RightMarg Greater than 256 (122333)
The information in this article applies to:
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0c
- Microsoft Excel for Windows NT 5.0
- Microsoft Excel for Windows 4.0a
This article was previously published under Q122333 SYMPTOMS
In 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.
CAUSE
The 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).
WORKAROUND
To 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."
STATUS
Microsoft 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
Modification Type: | Minor | Last Reviewed: | 8/15/2005 |
---|
Keywords: | KB122333 |
---|
|