Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default formatting sheets in a workbook

If I have a workbook with several sheets for instance months, how can I get
them all set up the same way, i.e. margins, page size, fonts,etc. I have
grouped the pages together but when grouped in page break view I cannot
change the margins, I have to ungroup and change each sheet, any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 791
Default formatting sheets in a workbook

Page Set up is not available when you group the worksheets, but a subroutine
could do it for you, However, it is a little slow.
Anyway change the range and other parameters to suit your needs.
Sub PrintFmt()
Dim wks As Worksheet
Application.ScreenUpdating = False
For Each wks In Worksheets
wks.Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:$I$24"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
Next
Application.ScreenUpdating = True
End Sub
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"SM_NCSW" wrote:

If I have a workbook with several sheets for instance months, how can I get
them all set up the same way, i.e. margins, page size, fonts,etc. I have
grouped the pages together but when grouped in page break view I cannot
change the margins, I have to ungroup and change each sheet, any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default formatting sheets in a workbook

I'm sorry I really don't know where all of this data would entered-- All I
really would like to do is set up a monthly form on individual worksheets.

"Michael" wrote:

Page Set up is not available when you group the worksheets, but a subroutine
could do it for you, However, it is a little slow.
Anyway change the range and other parameters to suit your needs.
Sub PrintFmt()
Dim wks As Worksheet
Application.ScreenUpdating = False
For Each wks In Worksheets
wks.Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:$I$24"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
Next
Application.ScreenUpdating = True
End Sub
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"SM_NCSW" wrote:

If I have a workbook with several sheets for instance months, how can I get
them all set up the same way, i.e. margins, page size, fonts,etc. I have
grouped the pages together but when grouped in page break view I cannot
change the margins, I have to ungroup and change each sheet, any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default formatting sheets in a workbook

For information on installing code see:

Getting Started with Macros and User Defined Functions
http://www.mvps.org/dmcritchie/excel/getstarted.htm

You have 2 choices - do it manually, sheet by sheet, as you are now, or
utilize VBA code (macros) to do each sheet for you. The advantage to the
latter is that you can be sure that each sheet is set up in identical fashion
- that is, no user errors



"SM_NCSW" wrote:

I'm sorry I really don't know where all of this data would entered-- All I
really would like to do is set up a monthly form on individual worksheets.

"Michael" wrote:

Page Set up is not available when you group the worksheets, but a subroutine
could do it for you, However, it is a little slow.
Anyway change the range and other parameters to suit your needs.
Sub PrintFmt()
Dim wks As Worksheet
Application.ScreenUpdating = False
For Each wks In Worksheets
wks.Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:$I$24"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
Next
Application.ScreenUpdating = True
End Sub
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"SM_NCSW" wrote:

If I have a workbook with several sheets for instance months, how can I get
them all set up the same way, i.e. margins, page size, fonts,etc. I have
grouped the pages together but when grouped in page break view I cannot
change the margins, I have to ungroup and change each sheet, any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default formatting sheets in a workbook

On Nov 6, 2:56*pm, Duke Carey
wrote:
For information on installing code see:

Getting Started with Macros and User Defined Functionshttp://www.mvps.org/dmcritchie/excel/getstarted.htm

You have 2 choices - do it manually, sheet by sheet, as you are now, or
utilize VBA code (macros) to do each sheet for you. *The advantage to the
latter is that you can be sure that each sheet is set up in identical fashion
- that is, no user errors


If it is exactly the same format desired on each sheet, manual is
pretty easy, and shouldn't be error-prone.

1) Format first sheet how desired.
2) Select all. (I like using the button for this, directly to the left
of the column A button)
3) Click Format Painter button on the toolbar.
4) Select 2nd sheet tab with mouse.
5) Holding Shift, select last sheet tab with mouse.
6) Click on cell A1. If you can't see A1, make sure you scroll with
the mouse (not any keyboard keys) to make it visible, then click on
it.

Now, that didn't address Page Setup, but the original question
confused cell format with page setup. Those can't be done together.
IE: margins are in Page Setup, Font Sizes are in cell formatting. I
have a different trick for that, assuming you can use 2 hands at once.

1) On first sheet, open Page Setup and set appropriately.
2) Press CTRL-PgDn. (don't let go of CTRL)
3) Press CTRL-Y. (don't let go of CTRL)
4) Repeat #2-3 til bored, or til you reach the last sheet. Probably
faster than running a macro, actually.
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
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
add new sheets in a workbook with new sheets being a variable [email protected] Excel Discussion (Misc queries) 1 April 11th 06 08:38 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
How do I copy print formatting to multiple sheets in a workbook? BFB@keystone Excel Discussion (Misc queries) 2 March 29th 06 01:34 AM
Formatting all sheets in a workbook to print the same mreed46112 Excel Discussion (Misc queries) 2 February 2nd 05 11:53 PM


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