@Today Function

  • Thread starter Thread starter cousin_jammie
  • Start date Start date
C

cousin_jammie

Hi All.. Id like to know if there is a way of inserting todays date
automatically without it changing to the current date each day.

EG.. I fill in a line of my database today and the date automatically
fills in todays date (@today) .. but tomorrow the date will change to
tomorrows date and so on. Is there a function or some formatting of
some description that will leave it at the value of the date so it wont
change with each passing day?

Hope my explanation isnt too confusing :)

Regards
Jan
 
Jan

Nothing Automatic unless you want worksheet_event code, but you can enter a
non-volatile date by hitting CRTL + ;(semi-colon).

If you're interested in the event code, post back with a brief description of
your data layout.

Gord Dibben XL2002
 
Try this attached to a toolbar button :-
'-------------------------------------
Sub AddDate()
Dim MyDate As Date
MyDate = Date
ActiveCell.Value = Format(MyDate, "dd/mm/yyyy")
End Sub
'-------------------------------------
 
Hi Brian.. thanks so much for answering my question, unfortunately, I
dont know how to do what you suggested. Do I need to do this in Visual
Basic?.. and do you mean a toolbar button (the only way I found to add
a button to a toolbar was with the macro command), or a button made
from the forms toolbar. I tried a couple of things to attach the code
to, but none of them worked. Im afraid my knowledge of excell is
fairly basic.

If you could be a little more specific I can give it another shot :)

Regards
Jan
 
Hi again Brian.. strike the above :) I fiddled around a bit longer and
using a button from the forms toolbar, added the coding to the VB
editor, and hey presto :) .. instant dates .. thanks so much for your
help.. its just what I was looking for.

Regards
Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top