date in cell comment

J

Jack Sons

Hi all,

I want to put todays date with a certain format (d-m-yy) in the comment of
cell B3. Can't find the proper code. Please help.

TIA

Jack Sons
The Netherlands
 
J

JE McGimpsey

One way:

Public Sub InsertDateInB3()
With Range("B3")
On Error Resume Next
.Comment.Delete
On Error GoTo 0
.AddComment Text:=Format(Date, "d-m-yy")
End With
End Sub
 
J

Jack Sons

JE,

Thanks, I treid to get it working with .AddComment Text:=Date, numberformat
("d-m-yy"), and other things like that, of course to no avail.

Jack.
 
Top