View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
Bob Phillips[_5_] Bob Phillips[_5_] is offline
external usenet poster
 
Posts: 620
Default How to make the Today() function static

Jeff,

Apart from mis-spelling your name (sorry!), I forgot to mention that this
code, if you choose to use it, should go into the applicable sheet module.

To get to this, right-click the sheet tab, and select the View option. This
will open the sheet code module, so then paste the code I gave into the code
pane.

Also, if you don't want the time, just use
Target.Offset(0, 1).Value = Format(Date, "dd mmm yyyy")

--

HTH

Bob Phillips

"Bob Phillips" wrote in message
...
Jedff,

VBA okay. This adds the datre to one coluimn right if achange is made to
A1:A10.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
If Target.Count = 1 Then
Target.Offset(0, 1).Value = Format(Date, "dd mmm yyyy

hh:mm:ss")
End If
End If

ws_exit:
Application.EnableEvents = True

End Sub


--

HTH

Bob Phillips

"JC Home" wrote in message
...
I would like to have a cell enter the current date when I make an entry

in
another cell, but I would like it to be static. The today() and now()

both
seem to be volatile. I know that I could use cntl ; but I would like

it
to be entered automatically.

Thanks

--
Jeff Ciaccio
Dallas, GA
(W) 770-591-6819 x-274
http://mywpages.comcast.net/ciaccio8515