Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Location
    California
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date in header (2000/sr2)

    Is there a way to do a calculated date in the header?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date in header (2000/sr2)

    In a VBA macro you can do something like this:

    <pre>Dim datCalcDate As Date
    datCalcDate = Date + 7
    Worksheets("Sheet1").PageSetup.CenterHeader = Format(datCalcDate, "mmmm d, yyyy")
    </pre>


    Or, if you want to calculate the date on the worksheet, you do this in the workbook before print event routine:

    <pre>Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Worksheets("Sheet1").PageSetup.CenterHeader = Format(Worksheets("Sheet1").Range("A1"), "mmmm d, yyyy")
    End Sub
    </pre>

    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Nov 2001
    Location
    California
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date in header (2000/sr2)

    Thanks for the info. I should be able to do what I need with either of these scenarios.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •