Results 1 to 6 of 6

Thread: Change the size of button present on Add-ins Custom Toolbar

  1. #1
    Neophyte Kuldeep Patel's Avatar
    Join Date
    Jul 2019
    Posts
    3
    Articles
    0
    Excel Version
    1906

    Change the size of button present on Add-ins Custom Toolbar



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello ,

    I have created 2 buttons with the help of VBA Code on Add-ins.But, How can I make the button size larger(change the size)? I have tried methods like height and width but it did not help me.


    Code:
    part of the code:
    Sub Auto_Open()
       
       '----- part of the code
        x = x + 1
        Set oControl = oBar.Controls.Add(ID:=specifyID, Before:=x)
        oControl.OnAction = "Specify Action"  
        oControl.FaceId = SpecifyFaceID
        oControl.Caption = "Specify Caption"      '(Not provided any values)
       '---- part of the code
    
    End Sub
    
    oControl is CommandBarControl
    I have tried oControl.Height and oControl.Width but it did not help.Also Not able to find solution.

    Please, help me with this. Thanks
    Last edited by AliGW; 2019-07-02 at 07:40 AM. Reason: New member - code tags added as example.

  2. #2
    Administrator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,666
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Hi
    please wrap code with code tags ( #button). Thanks
    Thank you Ken for this secure forum.

  3. #3
    Neophyte Kuldeep Patel's Avatar
    Join Date
    Jul 2019
    Posts
    3
    Articles
    0
    Excel Version
    1906
    Thanks!
    Can you please provide the example/details of how to wrap code with code tags #button?

  4. #4
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,247
    Articles
    0
    Excel Version
    Office 365 Subscription
    I have done it for you. Edit your opening post to see how I did it.
    Ali
    Enthusiastic self-taught user of MS Excel!

  5. #5
    Neophyte Kuldeep Patel's Avatar
    Join Date
    Jul 2019
    Posts
    3
    Articles
    0
    Excel Version
    1906
    Please, help me with this. Not able to make the buttons larger present on Add ins Custom Toolbar tab. Thanks

  6. #6
    Conjurer alansidman's Avatar
    Join Date
    Oct 2018
    Location
    Steamboat Springs
    Posts
    178
    Articles
    0
    Excel Version
    2019

Tags for this Thread

Posting Permissions

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