Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formats many sheets

Hi,

Is there a way I can do the following for all sheets in a
workbook (i.e. using a Macro), without having to manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Formats many sheets

Hi
a non VBA way:
- first group all the required sheets (hold down the SHIFT
key and select the sheets with your mouse)
- apply your formating

-----Original Message-----
Hi,

Is there a way I can do the following for all sheets in a
workbook (i.e. using a Macro), without having to manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for

Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formats many sheets

Frank,

This is OK, but for just about every workbook that I use,
I apply the below-mentioned properties.

Can someone supply me with the VBA way???

Thanks,

Craig.


-----Original Message-----
Hi
a non VBA way:
- first group all the required sheets (hold down the

SHIFT
key and select the sheets with your mouse)
- apply your formating

-----Original Message-----
Hi,

Is there a way I can do the following for all sheets in

a
workbook (i.e. using a Macro), without having to

manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for

Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has

the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.

.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Formats many sheets

Hi
simply record a macro while doing this manually :-)

-----Original Message-----
Frank,

This is OK, but for just about every workbook that I use,
I apply the below-mentioned properties.

Can someone supply me with the VBA way???

Thanks,

Craig.


-----Original Message-----
Hi
a non VBA way:
- first group all the required sheets (hold down the

SHIFT
key and select the sheets with your mouse)
- apply your formating

-----Original Message-----
Hi,

Is there a way I can do the following for all sheets in

a
workbook (i.e. using a Macro), without having to

manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for

Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has

the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.

.

.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Formats many sheets

Ok!!! :-)

What do I put at the start of the Macro??

Dim sh as Worksheet
For each sh in Worksheets
..
..
..
Next

???

(I'm a bit of a novice at this - can you tell??)



-----Original Message-----
Hi
simply record a macro while doing this manually :-)

-----Original Message-----
Frank,

This is OK, but for just about every workbook that I

use,
I apply the below-mentioned properties.

Can someone supply me with the VBA way???

Thanks,

Craig.


-----Original Message-----
Hi
a non VBA way:
- first group all the required sheets (hold down the

SHIFT
key and select the sheets with your mouse)
- apply your formating

-----Original Message-----
Hi,

Is there a way I can do the following for all sheets

in
a
workbook (i.e. using a Macro), without having to

manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for
Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has

the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.

.

.

.

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Formats many sheets

Hi Craig

One way would be to cycle through each sheet and apply the settings, but XL
can be vary slow doing this.
Slightly quicker is selecting all the sheets and apply these generic
settings.

Copy the procedure below into your "Personal.xls". I have not applied any
error checking code but it should do the business in most cases.


Now I think that deserves a beer! I'll have a Hoegaarden, please. (A nice
Belgian beer)

Regards

Paul


Sub FormatALLSelectedWorksheetsForPrinting()
Dim sht As Worksheet

Rem Collect all the worksheets together.
For Each sht In ActiveWorkbook.Worksheets
sht.Select False
Next


Rem The workbook in now in "Group" mode.
Rem The settings below will apply to all those selected sheets.
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&14&A"
.LeftMargin = Application.InchesToPoints(0.354330708661417)
.RightMargin = Application.InchesToPoints(0.354330708661417)
.PrintHeadings = True
.PrintGridlines = False
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
With ActiveWindow
.Zoom = 85
.DisplayGridlines = False
End With
Rem Get out of "Group" mode.
Sheets(1).Select



End Sub







"Craig McMillan" wrote in message
...
Hi,

Is there a way I can do the following for all sheets in a
workbook (i.e. using a Macro), without having to manually
do it for each one??

Center the sheet horizontally and vertically (for
Printout);
Include Row and Column Headings (for Printout);
Fit each sheet to 1 page wide by 1 page tall (for Printout)
Makes each sheet Landscape (for Printout);
Makes the left and right margins 0.9 inches each (for
Printout);
Adjust zoom size for each sheet to 85%;
Remove gridlines from each sheet;
Include a header in each sheet, on the left, that has the
tab name of the sheet in Arial, 14 point, bold.

Many Thanks,

Craig.



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
Sheets lose formats Mike H. Excel Discussion (Misc queries) 0 December 1st 09 12:00 AM
linking values and formats on from different sheets Rick Excel Worksheet Functions 3 August 31st 07 06:56 AM
Different Formats for Multiple Sheets within a Workbook ns Excel Worksheet Functions 2 May 22nd 05 03:39 AM
How to Link 2 Sheets with different formats Linking 2 Sheets w/ different formats Excel Worksheet Functions 2 March 18th 05 03:12 AM
Copy with link between sheets - all the formats dissapear?!? Kathrine Excel Discussion (Misc queries) 1 February 4th 05 03:45 PM


All times are GMT +1. The time now is 09:00 AM.

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

About Us

"It's about Microsoft Excel"