Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to attach command bar object label

    How to attach command bar object label
    The .DescriptionText and .Caption property don

  2. #2
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to attach command bar object label

    Use the Style property. 1 is icon only, 2 is text only (the Caption property is displayed) and 3 is icon plus text.

    There are other choices, too (not available from the Toolbar Customize pop-up menus)...

    From the Style Property help:

    Use with the CommandBarButton object: Returns or sets the way a command bar button control is displayed. Can be one of the following MsoButtonStyle constants: msoButtonAutomatic, msoButtonIcon, msoButtonCaption, msoButtonIconAndCaption, msoButtonIconAndCaptionBelow, msoButtonIconAndWrapCaption, msoButtonIconAndWrapCaptionBelow, or msoButtonWrapCaption.

    Hope this helps.

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to attach command bar object label

    Sorry my command bar object is a combo box, not a button!

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to attach command bar object label

    For a combo box, the Caption property should work! For example, if your Toolbar is named "MyToolbar" and the ComboBox control has a caption of, say, "Select from List", then you can change the text displayed to the left of the combo box using the code:

    <font face="Georgia"> CommandBars("MyToolbar").Controls("Select from List").Caption = "Pick from List"</font face=georgia>

    Be sure to set its Style property to msoComboLabel (=1).

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to attach command bar object label

    Yes, it works! Thanks!

Posting Permissions

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