Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Print Setup Not Set

In the VBA Sub below, all the settings are being changed EXCEPT
scaling the print area to 1 x 1 page. Does anyone know what might
cause this?

I checked by going to Print Preview. But, the 100% scaling box
was checked, not the next one. I am using Excel 2007.

Thanks, Alan

Sub ChangePrintSetup(DataWB As Workbook)
'
' Select columns A through P
With DataWB.ActiveSheet.PageSetup
' Select columns for the print area
.PrintArea = "$A:$P"
' Add print footer
.CenterFooter = "Page &P of &N"
' Set the margins for printing
.TopMargin = Application.InchesToPoints(0.66)
.BottomMargin = Application.InchesToPoints(0.66)
.LeftMargin = Application.InchesToPoints(0.95)
.RightMargin = Application.InchesToPoints(0.95)
' Scale print area to 1 page
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Print Setup Not Set

Never mind. Adding a ".Zoom = False" prior to the "FitToPages..."
statements fixed the problem.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Setup Leah Excel Discussion (Misc queries) 3 February 5th 10 01:01 AM
How do I protect the print setup? fraborah Excel Discussion (Misc queries) 0 April 17th 08 02:58 AM
Prevent print setup changes Kelly P[_2_] Excel Programming 1 February 27th 08 10:17 PM
VBA print setup Jacob Excel Programming 2 October 9th 06 03:38 PM
Print Setup Michele[_2_] Excel Programming 2 May 5th 04 07:10 PM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"