Results 1 to 12 of 12

Thread: Custom Toolbar

  1. #1
    cfe5001
    Guest

    Custom Toolbar

    I've created a custom toolbar, and would like to know how to add a vertical divide bar like the built-in toolbars (either in code or with the dialog box).

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    You can do it manually by right-clicking in the toolbar area and choosing "Customize" from the context menu, then dragging a button slightly further to the right than usual. For example, if you have three buttons, by dragging the middle button slightly to the right, you will get a separator in between the first and second button.

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    and in code you use something like:

    With .Add(msoControlButton)
    .BeginGroup = True
    .Caption = "Application"
    .OnAction = "DisplayApplicationInfo"
    .FaceId = 263
    End With

    where the key line is .BeginGroup = True

    Brooke

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Which version of XL Jim? That doesn't work for me in XL97 SR2. However if you go to Customise/New/Toolbars you get a new toolbar with the dividing lines on the left hand end, you can put button(s) on this and position it next to existing toolbars.

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Hmmm...

    It works for me on Excel 2000 in front of me now, and I have always been able to do that on Excel 97 in the past, and at home.

  6. #6
    Star Lounger
    Join Date
    Jan 2001
    Location
    Newcastle, New South Wales, Australia
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    You can use the Begin Group option from ToolsCustomise also.
    Go to the tab Commands; click on the toolbar button that will be the first one of the next group and then, from the ModifySelection drop down list, choose Begin A Group.

    Ruth

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Very neat Ruth, there is always another wrinkle to be learned in XL.

  8. #8
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    It works for me in 97 SR2

    Brooke

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Now I see. The line appears only when you release the left mouse button, I was looking for something to happen as I was dragging the button.

    Related question - is it possible to decrease the width of buttons so you can fit more of them on a toolbar? I have so many custom buttons I get extra rows of toolbars which decreases the number of rows visible on the screen.

  10. #10
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Why don't you categorize them by creating new menu's? This creates a 2nd dimension to your toolbars.

    For example, I have a list of documents I need access to on a regular basis. If have a menu called Documents (funnily enough) - I click on it and down drops a list of 20 or so - each a macro to open another document.

    The menu can be customised exactly like a toolbar with images and/or text and/or dividers - similar to what you may have when you click Tools or Insert.

  11. #11
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Custom Toolbar

    One (last?) variation on Ruth's solution:
    - just open the Customize dialog as she suggests but you don't have to even click on the Commands tab - whatever tab it opens to (usually Toolbars tab) is fine for your purpose of the dividing line
    - right click the icon that you want the separator line to the left of (or if working with menus, the item above which you want the separator). You'll get the same menu as with the Modify Selection. choose the Begin A Group item.

    fred

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Toolbar

    Thanks Leif, an excellent solution. It saves space, is almost as convenient as buttons, and if you are using one macro intensively you can copy it temporarily to a toolbar as a button.

Posting Permissions

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