+ Reply to Thread
Results 1 to 8 of 8

Date stamped comment box

  1. #1
    Windward
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Windward
    Guest

    Re: 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. #4
    Tom Ogilvy
    Guest

    Re: Date stamped comment box

    No, there was no misunderstanding.

    --
    Regards,
    Tom Ogilvy

    "Windward" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #5
    STEVE BELL
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #6
    Dave Peterson
    Guest

    Re: 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. #7
    Windward
    Guest

    Re: 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. #8
    Dave Peterson
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1