I want to write some code if a cells comment changes. Worksheet change doesn't fire if you right click a cell and edit the comment and save it. Is there an event that does fire when the comment changes?
you can use "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" if a cell property or value is changed or Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) for right click
you can use "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" if a cell property or value is changed or Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) for right click
This event isn't really tied to the comment change, selectionchange could be confusing to deal with. What I'm trying to do, is insert a date stamp into a comment whenever the comment changes. SelectionChange may fail me if they edit a comment and then to get out of it, click on a different cell. (Unless I can get the originating cell that was selected.
BeforeRightClick only would partially work again, because the keyboard shortcut to edit the comment could be used.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.