Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
"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
Posted to microsoft.public.excel.misc
|
|||
|
|||
"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
Posted to microsoft.public.excel.misc
|
|||
|
|||
"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
Posted to microsoft.public.excel.misc
|
|||
|
|||
"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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table to calc by group | Excel Discussion (Misc queries) | |||
Calculate cell row and column | Excel Discussion (Misc queries) | |||
Need help w/ Weight Formula | Excel Discussion (Misc queries) | |||
Can't group pivot table items by month in Excel | Excel Discussion (Misc queries) | |||
Subtotal of Subtotal displays Grand Total in wrong row | Excel Worksheet Functions |