Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The issue is in the printer driver. Update the driver to the latest and
hopefully the issue will go away. "Homer" wrote: I have a code that applies a page setup to all sheets in a workbook. The code will work fine. When I move the sheet tabs, then run the code, I get errror # 1004 "Unable to set papersize property of pagesetup class". Here is the code: Sub Page_Setup_For_All_Sheets() Dim sht As Worksheet For Each sht In ActiveWorkbook.Sheets With sht.PageSetup .LeftHeader = "" .CenterHeader = "&""Arial,Bold""&22 2009 Prestress Quote Log" .RightHeader = "&""Arial,Italic""&14&A" .LeftFooter = "" .CenterFooter = "&P" .RightFooter = "&D" .LeftMargin = Application.InchesToPoints(0.05) .RightMargin = Application.InchesToPoints(0.01) .TopMargin = Application.InchesToPoints(0.75) .BottomMargin = Application.InchesToPoints(0.5) .HeaderMargin = Application.InchesToPoints(0.25) .FooterMargin = Application.InchesToPoints(0.25) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperTabloid .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 100 .PrintErrors = xlPrintErrorsDisplayed End With Next sht Sheets("All").Activate End Sub This line is highlighted .PaperSize = xlPaperTabloid Any ideas why moving the tabs is creating the error? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving sheet tabs | Excel Discussion (Misc queries) | |||
Excel page setup Sheet Print Cells Error As... | Excel Discussion (Misc queries) | |||
Copy Page Setup across tabs | Excel Discussion (Misc queries) | |||
sheet tabs as page number and in a cell page of pages? | Excel Discussion (Misc queries) | |||
Apply Page Setup to other tabs | Setting up and Configuration of Excel |