Microsoft KB Archive/182243

= XL98: Cannot Use Page Setup Property If No Printers Installed =

Article ID: 182243

Article Last Modified on 10/10/2006

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q182243



For a Microsoft Excel 2002 version of this article, see 291298.

For a Microsoft Excel 2000 version of this article, see 213516.

For a Microsoft Excel 97 and earlier version of this article, see 172320.



SYMPTOMS
In Microsoft Excel 98 Macintosh Edition, if you run a Microsoft Visual Basic for Applications macro that attempts to set or get the page setup properties for any sheet in a workbook, you may receive either of the following error messages

Run-time error '1004':

Unable to set the  property of the PageSetup class

-or-

Run-time error '1004':

Unable to get the  property of the PageSetup class

where  is any of the following words:   BlackAndWhite        Order BottomMargin        Orientation CenterFooter        PaperSize CenterHeader        PrintArea CenterHorizontally  PrintComments CenterVertically    PrintGridlines ChartSize           PrintHeadings Draft               PrintNotes FirstPageNumber     PrintTitleColumns FitToPagesTall      PrintTitleRows FitToPagesWide      RightFooter FooterMargin        RightHeader HeaderMargin        RightMargin LeftFooter          TopMargin LeftHeader          Zoom LeftMargin



CAUSE
This problem occurs when there are no printer drivers installed on your computer. Microsoft Excel cannot set or get page setup properties if no printer drivers are installed.



RESOLUTION
To prevent this problem from occurring, install a printer driver on your computer.



STATUS
This behavior is by design of Microsoft Excel 98 Macintosh Edition.



MORE INFORMATION
In Microsoft Excel, page setup properties are only useful when you print or print preview one or more sheets in a workbook. Because of this, you cannot change or return most page setup properties unless at least one printer driver is installed as the default printer.

If you click Page Setup on the File menu when no printer drivers are installed, you receive the following error message:

Your file could not be printed due to an error on unknown printer (check Chooser). There are several possible reasons:

Just as you cannot access the Page Setup dialog box in this case, you cannot access the properties in the dialog box programmatically.

Additional query words: XL98

Keywords: kbdtacode kbprb KB182243

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.