Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert comment If cell content changes.
Hello all, I am trying to insert a comment if the content of a cell is
changed in a protected sheet. I have turned off "Move selection after enter" on the Edit tab and i have put this in my code "Application.MoveAfterReturn = False". But after enter it still jumps to the next cell and then the comment gets put into the new cell and not the altered cell. Is there a way to do this ?? Any help is much appreciated. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert comment If cell content changes.
Hi Les:
Use Target, not ActiveCell. You want something like: Private Sub Worksheet_Change(ByVal Target As Range) Target.AddComment Target.Comment.Visible = True Target.Comment.Text Text:="Hello World" Target.Select End Sub -- Gary''s Student - gsnu2007g "Les Stout" wrote: Hello all, I am trying to insert a comment if the content of a cell is changed in a protected sheet. I have turned off "Move selection after enter" on the Edit tab and i have put this in my code "Application.MoveAfterReturn = False". But after enter it still jumps to the next cell and then the comment gets put into the new cell and not the altered cell. Is there a way to do this ?? Any help is much appreciated. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert From Comment to Cell Content | Excel Discussion (Misc queries) | |||
Converting cell content into comment | Excel Programming | |||
Converting cell content into comment | Excel Discussion (Misc queries) | |||
Converting cell content into comment | Excel Discussion (Misc queries) | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) |