+ Reply to Thread
Results 1 to 5 of 5

Change event to Add or update comment with input box when cell in a range is changed

  1. #1
    Registered User
    Join Date
    07-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    11

    Change event to Add or update comment with input box when cell in a range is changed

    Hi VBA experts,
    I know there are many existing codes on updating comments online, but i am just not fit enough to change those macros to suit my needs. What i am looking for is something similar to this code below (found here: http://www.mrexcel.com/forum/excel-q...t-comment.html), but with multiple ranges such as A:B, D:G, T:Z

    Please Login or Register  to view this content.
    However, what I would additionally need is an input box, which enables me to enter the comment (without deleting previous comments) when a cell is changed. So in the end, each comment entered into a specific cell in this range would be in the cell that was changed along with the date and time when the comment was edited/created. Is that possible?
    Hope you understand what I mean

    Thanks a lot

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Change event to Add or update comment with input box when cell in a range is changed

    Hello fratello,

    Here is the amended version of the macro. Let me know the results.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Change event to Add or update comment with input box when cell in a range is changed

    Good Morning Leith Ross
    Thanks a lot for your post. This works perfectly fine, unless there are more than 5 changes to a cell. *Edit: I guess there is some kind of restriction based on the number of letters in the comment box.
    Only the first 5 changes are shown. Is their a way to show the last newest 5 commentaries? Or a way to copy every comment that has been made to a seperate worksheet, so that there is a history?
    Thanks a lot
    Last edited by Cutter; 08-28-2012 at 08:55 AM. Reason: Removed whole post quote

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Change event to Add or update comment with input box when cell in a range is changed

    Hello fratello,

    The problem with the comment was it accepts only 255 characters when the string is assigned by the text property. By using the Insert method, the 255 character limit no longer applies. I made a few changes to the macro to address the problem. Let me know the results on your machine.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Change event to Add or update comment with input box when cell in a range is changed

    HI Leith,
    Thank u very much. this works perfectly.
    A minor detail would be the order of the comments, starting with the newest one and ending with the oldest one. But it is not that important.
    Thank u very much

+ 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