Changing all Dates on Headers
Running this will change all the dates in the Center header to today's date:
Sub adjustit()
For Each sh In Worksheets
sh.Activate
v = ActiveSheet.PageSetup.CenterHeader
s = Format(Date, "mmmm dd, yyyy") & " - " & Split(v, "-")(1)
ActiveSheet.PageSetup.CenterHeader = s
Next
End Sub
--
Gary''s Student - gsnu200738
"Matt Dollar" wrote:
I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.
I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.
I know I'm greedy!
Thanks for your help!
|