ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   date in cell comment (https://www.excelbanter.com/excel-discussion-misc-queries/36757-date-cell-comment.html)

Jack Sons

date in cell comment
 
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



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


In article ,
"Jack Sons" wrote:

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


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.


"JE McGimpsey" schreef in bericht
...
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


In article ,
"Jack Sons" wrote:

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





All times are GMT +1. The time now is 12:20 AM.

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