Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default "Fit to page" in a group

in the setup I want "fit to page" to apply to each sheet in the group. I
thought it did last year but this year when I group all the spreadsheet and
do a print preview then change the set up to "fit to page" it only change the
page I am viewing. When I click next, I have to click set up again and "fit
to page". I thought changes in the group applied to the whole group.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default "Fit to page" in a group

Changes made directly on a sheet in a group will apply to all sheets in a
group. But the page setup (and other) attributes have to be set individually.

Here's a little macro code that would set all worksheets to the Fit to One
Page setting (both in height and width) at once. Use at your own risk <g
since you may not really want that on all sheets, which is why it doesn't
work on the group in the first place.

Sub OneTallOneWide()
Dim anySheet As Worksheet
For Each anySheet In Worksheets
anySheet.PageSetup.FitToPagesWide = 1
anySheet.PageSetup.FitToPagesTall = 1
Next
End Sub


"chanceygardener" wrote:

in the setup I want "fit to page" to apply to each sheet in the group. I
thought it did last year but this year when I group all the spreadsheet and
do a print preview then change the set up to "fit to page" it only change the
page I am viewing. When I click next, I have to click set up again and "fit
to page". I thought changes in the group applied to the whole group.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default "Fit to page" in a group

I copied this code into my spreadsheet but it didn't seem t work. what do
you think I did wrong? I tried it both on the spreadsheet I was using and
also on the spreadsheet I keep a lot of other macros. It seems to run but
with no effect so I must be doning something wrong. Note I haven't been
using VB very long so there is a lot I don't know.

"JLatham" wrote:

Changes made directly on a sheet in a group will apply to all sheets in a
group. But the page setup (and other) attributes have to be set individually.

Here's a little macro code that would set all worksheets to the Fit to One
Page setting (both in height and width) at once. Use at your own risk <g
since you may not really want that on all sheets, which is why it doesn't
work on the group in the first place.

Sub OneTallOneWide()
Dim anySheet As Worksheet
For Each anySheet In Worksheets
anySheet.PageSetup.FitToPagesWide = 1
anySheet.PageSetup.FitToPagesTall = 1
Next
End Sub


"chanceygardener" wrote:

in the setup I want "fit to page" to apply to each sheet in the group. I
thought it did last year but this year when I group all the spreadsheet and
do a print preview then change the set up to "fit to page" it only change the
page I am viewing. When I click next, I have to click set up again and "fit
to page". I thought changes in the group applied to the whole group.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default "Fit to page" in a group

Actually your code helped me figure out what i did last year to change all
the sheets in the group to print on one page. Instead of doing print preview
and then selecting one page t and one page w, if i group all the sheet I want
this to apply to and then select file, page set up, and then select one p w
and one p t, it does change them all. I tried that when I saw that was what
your code was trying to do. I would still like to get the code to work even
though my problem is solved so if you could help me with that I would
appreciated it thanks.

"JLatham" wrote:

Changes made directly on a sheet in a group will apply to all sheets in a
group. But the page setup (and other) attributes have to be set individually.

Here's a little macro code that would set all worksheets to the Fit to One
Page setting (both in height and width) at once. Use at your own risk <g
since you may not really want that on all sheets, which is why it doesn't
work on the group in the first place.

Sub OneTallOneWide()
Dim anySheet As Worksheet
For Each anySheet In Worksheets
anySheet.PageSetup.FitToPagesWide = 1
anySheet.PageSetup.FitToPagesTall = 1
Next
End Sub


"chanceygardener" wrote:

in the setup I want "fit to page" to apply to each sheet in the group. I
thought it did last year but this year when I group all the spreadsheet and
do a print preview then change the set up to "fit to page" it only change the
page I am viewing. When I click next, I have to click set up again and "fit
to page". I thought changes in the group applied to the whole group.

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
Pivot table to calc by group xlcharlie Excel Discussion (Misc queries) 0 January 24th 06 10:40 PM
Calculate cell row and column Barb R. Excel Discussion (Misc queries) 7 May 2nd 05 07:02 PM
Need help w/ Weight Formula Tom Excel Discussion (Misc queries) 3 March 4th 05 05:23 PM
Can't group pivot table items by month in Excel scott_ensley Excel Discussion (Misc queries) 1 February 1st 05 08:41 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


All times are GMT +1. The time now is 10:02 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"