ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Footer, "fixed" date (https://www.excelbanter.com/excel-programming/314778-footer-fixed-date.html)

John F[_2_]

Footer, "fixed" date
 
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

Frank Stone

Footer, "fixed" date
 
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
.


Frank Kabel

Footer, "fixed" date
 
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



Sharad Naik

Footer, "fixed" date
 
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




Dave Peterson[_3_]

Footer, "fixed" date
 
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


Tim[_39_]

Footer, "fixed" date
 
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





All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com