ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Don - Please help on another subject - headers (https://www.excelbanter.com/excel-programming/421405-don-please-help-another-subject-headers.html)

ConnieM_brd[_2_]

Don - Please help on another subject - headers
 
On this same directory workbook. I have a header that I want on all pages.
I made changes to the ALL ws and then I recorded a macro that would take the
text from ALL ws and copy to LAST_TITLE ws. It worked when I was recording
the macro, but when I run the macro - all I get is the screen jumping and
nothing changes. I need to do the same on the ALL footer. I am trying to
make this 'task' of updating the directory easy for the actual user who will
need to update. And I thought that my creating macros would be so nice. So
far the 2 macros I created aren't working - it must be me.

Sub Header()
'
' Header Macro
'

'
Sheets("ALL").Select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Times New Roman,Bold Italic""&14Central Lakes
College&""Arial,Bold""&10" & Chr(10) & "Brainerd/Staples Campus Telephone
Directory €“ Klick 2008"
.RightHeader = ""
.LeftFooter = "&7Update 12/15/08"
.CenterFooter = _
"&8 E-Mail address is: 1st initial of 1st name, last
" & Chr(10) & "Names in BOLD are members of the Presidents
Cabinet" & Chr(10) & "PLEASE NOTE Extensions that are 83-- can only be dialed
internally"
.RightFooter = "&7Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.41)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.83)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.Zoom = 82
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = False
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Sheets("LAST_TITLE").Select
End Sub


Don Guillett

Don - Please help on another subject - headers
 
If desired, send your wb to my address below with complete desires and
before/after examples. When I have time I will take a look.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ConnieM_brd" wrote in message
...
On this same directory workbook. I have a header that I want on all
pages.
I made changes to the ALL ws and then I recorded a macro that would take
the
text from ALL ws and copy to LAST_TITLE ws. It worked when I was
recording
the macro, but when I run the macro - all I get is the screen jumping and
nothing changes. I need to do the same on the ALL footer. I am trying to
make this 'task' of updating the directory easy for the actual user who
will
need to update. And I thought that my creating macros would be so nice.
So
far the 2 macros I created aren't working - it must be me.

Sub Header()
'
' Header Macro
'

'
Sheets("ALL").Select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Times New Roman,Bold Italic""&14Central Lakes
College&""Arial,Bold""&10" & Chr(10) & "Brainerd/Staples Campus Telephone
Directory €“ Klick 2008"
.RightHeader = ""
.LeftFooter = "&7Update 12/15/08"
.CenterFooter = _
"&8 E-Mail address is: 1st initial of 1st name, last
" & Chr(10) & "Names in BOLD are members of the Presidents
Cabinet" & Chr(10) & "PLEASE NOTE Extensions that are 83-- can only be
dialed
internally"
.RightFooter = "&7Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.41)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.83)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.Zoom = 82
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = False
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Sheets("LAST_TITLE").Select
End Sub




All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com