+ Reply to Thread
Results 1 to 8 of 8

Excel Custom Made Toolbar

Hybrid View

  1. #1
    Registered User
    Join Date
    07-21-2006
    Posts
    24

    Question Excel Custom Made Toolbar

    Hi Guys,

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

    Thanks

    Dan

  2. #2
    Norman Jones
    Guest

    Re: Excel Custom Made Toolbar

    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
    >




  3. #3
    Registered User
    Join Date
    07-21-2006
    Posts
    24
    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

  4. #4
    Norman Jones
    Guest

    Re: Excel Custom Made Toolbar

    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



  5. #5
    Registered User
    Join Date
    07-21-2006
    Posts
    24
    Ok, so is there code to disable a button within a toolbar?

  6. #6
    Norman Jones
    Guest

    Re: Excel Custom Made 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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1