Hello,
I would like to disable Insert Comment when right clicking on any cell of a spreadsheet.
Using the code below I have managed to disable "Delete Comment, Edit Comment, Show/Hide Comment", however this does not seem to work for Insert Comment. Any ideas?
Thank you.
I would like to disable Insert Comment when right clicking on any cell of a spreadsheet.
Using the code below I have managed to disable "Delete Comment, Edit Comment, Show/Hide Comment", however this does not seem to work for Insert Comment. Any ideas?
Thank you.
VBA Code:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("Insert Comment").Enabled = False
.Controls("Delete Comment").Enabled = False
.Controls("Edit Comment").Enabled = False
.Controls("Show/Hide Comments").Enabled = False
End With
End Sub