Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Append to Comment
Hi Experts,
I would like to write a macro that can check whether the activecell contains any comment, and if there is I would like to append new string to the existing comment. If there is none, then I would like to add a new comment to the cell. Can you experts out there help me with this? MANY THANKS IN ADVANCE. LSB |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Append to Comment
Here is one way, don't remember who to give credit to for the macro
Sub CommentAddOrEdit() 'adds new plain text comment or positions 'cursor at end of existing comment text Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "LSB" wrote in message ... Hi Experts, I would like to write a macro that can check whether the activecell contains any comment, and if there is I would like to append new string to the existing comment. If there is none, then I would like to add a new comment to the cell. Can you experts out there help me with this? MANY THANKS IN ADVANCE. LSB |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Append to Comment
It looks like it came from he
http://www.contextures.com/xlcomments03.html#Plain (Debra Dalgleish's site) She has lots of other sample code, too. Paul B wrote: Here is one way, don't remember who to give credit to for the macro Sub CommentAddOrEdit() 'adds new plain text comment or positions 'cursor at end of existing comment text Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "LSB" wrote in message ... Hi Experts, I would like to write a macro that can check whether the activecell contains any comment, and if there is I would like to append new string to the existing comment. If there is none, then I would like to add a new comment to the cell. Can you experts out there help me with this? MANY THANKS IN ADVANCE. LSB -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Append to Comment
Thanks Dave, I will make a note of that
-- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Dave Peterson" wrote in message ... It looks like it came from he http://www.contextures.com/xlcomments03.html#Plain (Debra Dalgleish's site) She has lots of other sample code, too. Paul B wrote: Here is one way, don't remember who to give credit to for the macro Sub CommentAddOrEdit() 'adds new plain text comment or positions 'cursor at end of existing comment text Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "LSB" wrote in message ... Hi Experts, I would like to write a macro that can check whether the activecell contains any comment, and if there is I would like to append new string to the existing comment. If there is none, then I would like to add a new comment to the cell. Can you experts out there help me with this? MANY THANKS IN ADVANCE. LSB -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you append one row to another? | Excel Worksheet Functions | |||
Append worksheets together in one | Excel Discussion (Misc queries) | |||
How can I edit a comment w/o first having to select Show Comment | Excel Discussion (Misc queries) | |||
Hotkey problem w/ macro to append comment | Excel Discussion (Misc queries) | |||
a comment plugin & copy paste directly from excel to comment ? fr. | Excel Worksheet Functions |