Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert From Comment to Cell Content Sue Excel Discussion (Misc queries) 1 March 19th 10 01:26 PM
Converting cell content into comment Akash Excel Programming 9 September 4th 07 01:51 PM
Converting cell content into comment Akash Maheshwari Excel Discussion (Misc queries) 2 September 4th 07 07:48 AM
Converting cell content into comment Akash Maheshwari Excel Discussion (Misc queries) 0 September 4th 07 06:30 AM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"