Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Sheet settings

Hi there,

I ahev recorded a macro that allows me to alter the set-up
of a sheet as follows:

Center the sheet horizontally and vertically (for printing)
Includes Row and Column headings (for printout)
Fits sheet to 1 page wide by 1 page tall (for printout)
Makes sheet landscape (for printout)
Makes the left and right margins 0.9 inches each (for
printout)
Adjusts zoom size to 85%
Remove gridlines
Include header, on the left, that has the tab name of the
sheet in Arial, 14 point, bold.

How can I adjust this macro so that whenever I open a
workbook (whether it has been worked on previously or if
its a new workbook), I can run this macro, and every sheet
in the workbook will have these settings (i.e. some sort
of "for each sheet in workbook, do....")

Many Thanks,

Colin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Sheet settings

Colin,

You can do it with application events. To do this, you will need to have a
workbook that opens when Excel starts that set it all up, say Personal.xls.

'========================================
Insert a class module, rename it to 'clsAppEvents', with this code

Option Explicit

Public WithEvents App As Application


Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

'your code or a call to your macro

End Sub

'========================================
In ThisWorkbook code module, add this event code

Dim AppClass As New clsAppEvents

Private Sub Workbook_Open()

Set AppClass.App = Application

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Colin" wrote in message
...
Hi there,

I ahev recorded a macro that allows me to alter the set-up
of a sheet as follows:

Center the sheet horizontally and vertically (for printing)
Includes Row and Column headings (for printout)
Fits sheet to 1 page wide by 1 page tall (for printout)
Makes sheet landscape (for printout)
Makes the left and right margins 0.9 inches each (for
printout)
Adjusts zoom size to 85%
Remove gridlines
Include header, on the left, that has the tab name of the
sheet in Arial, 14 point, bold.

How can I adjust this macro so that whenever I open a
workbook (whether it has been worked on previously or if
its a new workbook), I can run this macro, and every sheet
in the workbook will have these settings (i.e. some sort
of "for each sheet in workbook, do....")

Many Thanks,

Colin



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
Zero Value Settings Sallie Excel Discussion (Misc queries) 1 April 5th 07 04:28 PM
Settings tjh Excel Discussion (Misc queries) 0 August 9th 05 09:20 PM
settings Bee Excel Worksheet Functions 1 February 22nd 05 06:07 PM
Footer Settings in an Excel Sheet Dave Peterson Excel Discussion (Misc queries) 0 January 24th 05 10:58 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


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