View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default If ActiveCell has a comment then exit sub

On Monday, January 12, 2015 at 11:12:33 PM UTC-8, Claus Busch wrote:
Hi Howard,

Am Mon, 12 Jan 2015 17:13:24 -0800 (PST) schrieb L. Howard:

ElseIf myAE = "Edit" Then
MyComment = InputBox("Enter your comments", "Comments")
ActiveCell.Comment.Text Text:=MyComment


what if she wants to keep the existing text and add new text?


Regards
Claus B.
--



That was not mentioned.

I messed with it a bit and can get the OLD text to a variable but can't get it to precede the NEW text in the code.

It has to be something like this but this won't fly...

ElseIf myAE = "Edit" Then
oldCmt = ActiveCell.Comment.Text

MyComment = InputBox("Enter your Comment NEW text...", "Comments")
ActiveCell.Comment.Text Text:=oldCmt & " " & Text:=MyComment

Howard