Article ID: 172320
Article Last Modified on 8/17/2005
APPLIES TO
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
This article was previously published under Q172320
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 98 version of this article, see
182243.
SYMPTOMS
In the versions of Microsoft Excel listed above, 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 <x> property of the PageSetup class
Run-time error '1004':
Unable to get the <x> property of the PageSetup class
where <x> 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.
This behavior is by design of Microsoft Excel.
RESOLUTION
To prevent this problem from occurring, install a printer driver on your
computer. Use the appropriate method for your situation:
- In Microsoft Windows 95, Microsoft Windows 3.x, and Microsoft Windows
NT version 4.0, use the Printers option in Control Panel to add and
remove printer drivers.
- In Microsoft Windows NT version 3.x, use the Print Manager to
add and remove printer drivers.
Additional query words: XL97 XL7 XL5 3.1 3.11 3.5 3.51 5.00c 7.00a XL
Keywords: kbprb kbdtacode KB172320