Thread: Command buttons
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Command buttons

One way:

Option Explicit
Sub testme()
On Error Resume Next
With Application.CommandBars("worksheet menu bar").Controls("Insert")
.Controls("comment").Enabled = False
.Controls("edit comment").Enabled = False
End With
On Error GoTo 0
End Sub

If the activecell already has a comment, then you see "edit comment". I just
turned both off (ignoring any error).



Russell Stevenson wrote:

Dave,

Thanks for that. It worked a treat. I was almost there. Same storey
though, a minor error in the syntax.

One other problem I have is that I wish to disable the 'Insert Comment'
function on the drop down menu. Again, can you offer any advice.

Thanks
Rus

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--

Dave Peterson