Excel Custom Made Toolbar

  • Thread starter Thread starter drawlings
  • Start date Start date
D

drawlings

Hi Guys,

Need to know if it is possible to enable/disable/hide/show certai
buttons on a custom toolbar I made

Thanks

Da
 
Hi Dan,

Try something like:

'=============>>
Public Sub TesterA01()
Dim TBar As CommandBar

Set TBar = Application.CommandBars("YourToolbar") '<<==== CHANGE
TBar.Controls(1).Enabled = False

End Sub
'<<=============
 
Thanks for your reply.

That code works great at disabling the toolbar itself, but I need to
disable certain buttons within the toolbar.

Example:

Toolbar Name: P&L
I have 6 buttons in total and I want to disable the second button
'Options'.
Button1 = Download
Button2 = Options

etc.....



Thanks

Dan
 
Hi Dan,
That code works great at disabling the toolbar itself, but I need to
disable certain buttons within the toolbar.

The suggested code does not disable the custom toolbar; it disables only the
first control on the toolbar.
 
Hi Dan,

Try:

Application.CommandBars("YourToolBar"). _
Controls(1).Controls(1).Enabled = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top