Thread: toolbars
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default toolbars

Sub test()
Dim cbr As CommandBar, ctr As Object

Set cbr = Application.CommandBars("MyCustomBar")
cbr.Visible = True ' false

'' either disable the toolbar, uncomment following
' cbr.Enabled = False ' True to re-enable

' or 'grey-out' all the controls
For Each ctr In cbr.Controls
ctr.Enabled = False
Next

End Sub

Regards,
Peter T

"greg" wrote in message
...
Hello,
I have a custom toolbar. that I have created by hand. Then attached into

a
workbook.
Is there a way to enable or disable buttons on this?
I looked in the object browser. But there does not seem to be any toolbar
object.

thanks