Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In part of my footer macro, (see below) I need a fixed date
- ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. ..LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
try replacing the date with now() or today() now() will add time to the the date where today will just give the date. regards Frank -----Original Message----- In part of my footer macro, (see below) I need a fixed date - ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. ..LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
..LeftFooter = "&""Arial,Bold""8 & format(date,"MMM, DD, YYYY") & Chr(10) & "JFS" -- Regards Frank Kabel Frankfurt, Germany "John F" schrieb im Newsbeitrag ... In part of my footer macro, (see below) I need a fixed date - ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. .LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Its just ' Date ' which gives you current date.
.LeftFooter = "&""Arial,Bold""" & Date & Chr(10) & "JFS" (Note the 3 quote marks after Bold above.) Sharad "John F" wrote in message ... In part of my footer macro, (see below) I need a fixed date - ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. .LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe:
..LeftFooter = "&""Arial,Bold""&8" & format(date,"mmm. dd, yyyy") _ & Chr(10) & "JFS" I don't usually include that period after the Month abbreviation--but that's just a personal preference.) John F wrote: In part of my footer macro, (see below) I need a fixed date - ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. .LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The replies already posted will give you the date, however, if i understand
correctly, you don't want that date to change again for that file. one way is to have the macro run just when you press a button (ie, controlled by you); another way is to have it 'flag' a particular cell when it runs for the first time and have this code in an 'if...then' statement, so if the cell is already flagged, it does not re-run the code within the 'if...then' (and therefore does not re-insert a new date) hope that makes sense! tim "John F" wrote in message ... In part of my footer macro, (see below) I need a fixed date - ie: current date, that does not change when I open the file again on a different date. The only time the date should change is when I run the macro again, at some future time, which I would do after making a change to the form. Currently I go in every morning and change the date in the macro. There must be a way to get the current date VALUE only, to accomplish what I need. .LeftFooter = "&""Arial,Bold""&8Oct. 26, 2004" & Chr(10) & "JFS" John F. Scholten |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating a "date selector box" or "pull down box" in a cell | Excel Worksheet Functions | |||
Convert numbers to date: "586" to read "May 1986" | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
xy plot line style change when I select "fixed maximum" | Charts and Charting in Excel | |||
Showing "Created by User, Date, Time" in Footer | Excel Discussion (Misc queries) |