Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What i have is a macro that formatts the sheet that I run when I start
working on a sheet. What i am wondering is how to have it put todays date in the center header box. Curently i have it putting in a 4 to hold the text sizr formatting. **The text in the left headder is changed from actual infomation because it contains compay information. But the one thing is that the date cannot change. Once the date has been put in there i need it to always be the same. Here is the macro Any help is very appreciated. Thank you!! Sub HeadderFooter() ' ' Macro1 Macro ' Macro recorded 8/17/2005 by cwa9821 ' ' With ActiveSheet.PageSetup .PrintTitleRows = "" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "AKER****** " .CenterHeader = "&20 4" .RightHeader = "" .LeftFooter = "By: MCone" .CenterFooter = "&F" .RightFooter = "Page &P of &N" .LeftMargin = Application.InchesToPoints(0.75) .RightMargin = Application.InchesToPoints(0.75) .TopMargin = Application.InchesToPoints(1.83) .BottomMargin = Application.InchesToPoints(0.8) .HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.3) .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 Selection.Merge Application.Dialogs(xlDialogPageSetup).Show Range("A1").Select ActiveCell.FormulaR1C1 = "See Markup of Attached Drawings for Shot Locations" Range("A1").Select Selection.Font.Bold = True Range("B1").Select ActiveCell.FormulaR1C1 = "0" Range("b1:R100").Select Selection.NumberFormat = "0.00" Selection.NumberFormat = "0.000" End Sub -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
monthly spreadsheet- can not add date to inserted row | Excel Worksheet Functions | |||
Excel automatically updates inserted date | Excel Worksheet Functions | |||
Formula Based Data Validation 4 Date To Be Inserted | Excel Discussion (Misc queries) | |||
Automatically have the date or time inserted into a cell | Excel Discussion (Misc queries) | |||
Why isn't an 'ampersand' visable when inserted in a custom header. | Excel Discussion (Misc queries) |