Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command buttons
How do I apply code to disable command buttons. ie. If I want to
disable the 'Format Painter' button then what do I do?? Thanks in anticipation. Rus Stevens |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command buttons
This worked ok for me:
Application.CommandBars("standard").Controls("form at painter").Enabled = True Russell Stevenson wrote: How do I apply code to disable command buttons. ie. If I want to disable the 'Format Painter' button then what do I do?? Thanks in anticipation. Rus Stevens -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command buttons
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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Buttons | Excel Discussion (Misc queries) | |||
Command Buttons | Excel Discussion (Misc queries) | |||
Help with command buttons | Excel Worksheet Functions | |||
command buttons | Excel Worksheet Functions | |||
Control Buttons vs. Command Buttons | Excel Programming |