Hi Guys,
Need to know if it is possible to enable/disable/hide/show certain buttons on a custom toolbar I made
Thanks
Dan
Hi Guys,
Need to know if it is possible to enable/disable/hide/show certain buttons on a custom toolbar I made
Thanks
Dan
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
'<<=============
--
---
Regards,
Norman
"drawlings" <drawlings.2cl0h4_1155645907.2169@excelforum-nospam.com> wrote
in message news:drawlings.2cl0h4_1155645907.2169@excelforum-nospam.com...
>
> Hi Guys,
>
> Need to know if it is possible to enable/disable/hide/show certain
> buttons on a custom toolbar I made
>
> Thanks
>
> Dan
>
>
> --
> drawlings
> ------------------------------------------------------------------------
> drawlings's Profile:
> http://www.excelforum.com/member.php...o&userid=36626
> View this thread: http://www.excelforum.com/showthread...hreadid=571747
>
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.
---
Regards,
Norman
Ok, so is there code to disable a button within a toolbar?
Hi Dan,
Yes - try my suggested code.
---
Regards,
Norman
"drawlings" <drawlings.2cmiep_1155715805.0259@excelforum-nospam.com> wrote
in message news:drawlings.2cmiep_1155715805.0259@excelforum-nospam.com...
>
> Ok, so is there code to disable a button within a toolbar?
>
>
> --
> drawlings
> ------------------------------------------------------------------------
> drawlings's Profile:
> http://www.excelforum.com/member.php...o&userid=36626
> View this thread: http://www.excelforum.com/showthread...hreadid=571747
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks