Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Date stamped comment box

I need the date the comment was created to appear next to the name of
the person that inserted the comment to the cell. Is there any easy way
to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date stamped comment box

There is no setting for this.


There is no add comment event - so not sure how code would do it except
perhaps through brute force; looping through comments and identifying those
which don't contain dates and adding the date using some reliable trigger
like calculate or selection change.

--
Regards,
Tom Ogilvy


"Windward" wrote in message
oups.com...
I need the date the comment was created to appear next to the name of
the person that inserted the comment to the cell. Is there any easy way
to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Date stamped comment box

I think there is a missunderstanding, I don't need to go through
existing comments & find out when they were created (although that
would be nice)

I just want all new comments to automatically input the date next to
the name of whoever is creating the comment.

Thanks,
Josh

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date stamped comment box

No, there was no misunderstanding.

--
Regards,
Tom Ogilvy

"Windward" wrote in message
oups.com...
I think there is a missunderstanding, I don't need to go through
existing comments & find out when they were created (although that
would be nice)

I just want all new comments to automatically input the date next to
the name of whoever is creating the comment.

Thanks,
Josh



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Date stamped comment box

The only way I can imagine this being done is using code to create all
comments...

--
steveB

Remove "AYN" from email to respond
"Windward" wrote in message
oups.com...
I think there is a missunderstanding, I don't need to go through
existing comments & find out when they were created (although that
would be nice)

I just want all new comments to automatically input the date next to
the name of whoever is creating the comment.

Thanks,
Josh





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Date stamped comment box

You could give the users a macro:

Option Explicit
Sub testme01()

Dim myText As String

myText = InputBox(Prompt:="What's the comment?")

If Trim(myText) = "" Then
Exit Sub
End If

myText = Application.UserName & vbLf & Format(Date, "mm/dd/yyyy") _
& vbLf & myText

With ActiveCell
If .Comment Is Nothing Then
'do nothing
Else
.Comment.Delete
End If
.AddComment Text:=myText
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Windward wrote:

I need the date the comment was created to appear next to the name of
the person that inserted the comment to the cell. Is there any easy way
to do this?


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Date stamped comment box

Thanks Dave, that's awesome! If used on a cell that already has a
comment. is it possible to keep the original comment and just edit it
with a new date stamped comment?

Thanks again

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Date stamped comment box

There's lots of ways you can type a date. But this could give you some ideas:

Option Explicit
Sub testme01()

Dim myText As String
Dim ColonPos As Long

With ActiveCell
If .Comment Is Nothing Then
myText = InputBox(Prompt:="What's the comment?")
If Trim(myText) = "" Then
'do nothing
Else
myText = Application.UserName & vbLf _
& Format(Date, "mm/dd/yyyy") _
& vbLf & myText
.AddComment Text:=myText
End If
Else
myText = .Comment.Text
If myText Like "*##/##/####*" _
Or myText Like "*#/#/####*" Then
'do nothing, it has a date
Else
ColonPos = InStr(1, myText, ":", vbTextCompare)
If ColonPos 0 Then
myText = Left(myText, ColonPos) & " " _
& Format(Date, "mm/dd/yyyy") & " " _
& Mid(myText, ColonPos + 1)
End If
.Comment.Text myText
End If
End If

End With
End Sub



Windward wrote:

Thanks Dave, that's awesome! If used on a cell that already has a
comment. is it possible to keep the original comment and just edit it
with a new date stamped comment?

Thanks again


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comment with date stamp, again Keyrookie Excel Worksheet Functions 1 December 31st 09 11:20 AM
Comment with date stamp Keyrookie Excel Worksheet Functions 0 December 9th 09 05:29 PM
comment with date RKS Excel Discussion (Misc queries) 3 April 5th 08 01:05 PM
date in cell comment Jack Sons Excel Discussion (Misc queries) 2 July 24th 05 09:55 AM
Insert Date Comment Aaron Excel Programming 1 June 30th 04 03:13 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"