Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Changing PageSetup Across All Worksheets

I need to print several (30-40) workbooks which contain differently named
sheets and some do not have defined print properties. I have code that opens
any xls file in the designated folder, but I have not been able to set the
print properties for every sheet in each file as it opens.

I need to set the sheets to print landscape and fit to 1 page wide and 1
page tall.

I have started with the following code:

Dim sh As Worksheet

For Each sh In ActiveWorkbook.Sheets
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Next sh

End Sub

I have not been able to get the code to test correctly on a test file. Not
all settings seem to apply to all sheets.

Thanks for any help.

- - TB - -

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
Changing footers on all worksheets without changing print set up KC Excel Discussion (Misc queries) 1 October 26th 07 03:31 PM
PageSetup Stanley Excel Discussion (Misc queries) 1 December 14th 05 07:21 PM
PageSetup Simon Shaw[_4_] Excel Programming 1 May 28th 04 08:41 AM
Changing page orientation with pagesetup No Name Excel Programming 2 April 29th 04 01:02 AM
VBA 'PageSetup' performance John[_74_] Excel Programming 1 January 29th 04 01:28 AM


All times are GMT +1. The time now is 02:08 PM.

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"