+ Reply to Thread
Results 1 to 2 of 2

Date in header

  1. #1
    Jan
    Guest

    Date in header

    Using Excel 97. I created a macro (s) to change the header depending on
    which dept will receive the report. I don't know VBA. In the header dialog
    box, I selected the date icon to insert the date. When I look at the macro
    via the VBA editor it shows as &D. On the report it will print the date as
    5/11/2006. I would like it to print the date as May 11, 2006. How can I
    change the following code to format the date as preferred. I have only
    listed a few lines of the code.

    With ActiveSheet.PageSetup
    .LeftHeader = "&""Cushing Book/Bold,Bold""&T"
    .CenterHeader = _
    "&""Cushing Book/Bold,Bold""&12Perpetual Art Department Project List
    for &D"

    Also, if the date is inserted in the header via running a macro, I assume
    that the date will not change unless the macro is executed again....correct?

    TIA
    Jan

  2. #2
    Ardus Petus
    Guest

    Re: Date in header

    .CenterHeader = _
    "&""Cushing Book/Bold,Bold""&12Perpetual Art Department Project List
    for " & _
    Format(Date,"mmm d, yyyy")

    HTH
    --
    AP

    "Jan" <[email protected]> a écrit dans le message de news:
    [email protected]...
    > Using Excel 97. I created a macro (s) to change the header depending on
    > which dept will receive the report. I don't know VBA. In the header
    > dialog
    > box, I selected the date icon to insert the date. When I look at the
    > macro
    > via the VBA editor it shows as &D. On the report it will print the date
    > as
    > 5/11/2006. I would like it to print the date as May 11, 2006. How can I
    > change the following code to format the date as preferred. I have only
    > listed a few lines of the code.
    >
    > With ActiveSheet.PageSetup
    > .LeftHeader = "&""Cushing Book/Bold,Bold""&T"
    > .CenterHeader = _
    > "&""Cushing Book/Bold,Bold""&12Perpetual Art Department Project
    > List
    > for &D"
    >
    > Also, if the date is inserted in the header via running a macro, I assume
    > that the date will not change unless the macro is executed
    > again....correct?
    >
    > TIA
    > Jan




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1