S
S
sky1442015-12-31 14:32:55
Programming
sky144, 2015-12-31 14:32:55

How to increase the size of the created button on the Excel panel in VBA?

There is a procedure for creating your own items in the Excel menu. For example, add a button.
Private Sub Auto_open()
Dim WorksheetsMenuBar As CommandBar 'Declare main excel panel
Dim Button As CommandBarControl 'Item in dropdown submenu
Set WorksheetsMenuBar = CommandBars.ActiveMenuBar
Set Button = WorksheetsMenuBar.Controls.Add(Type:=msoControlButton, ID:=1)
Button. FaceId = 926
End Sub
How to increase its size? The editor suggests two methods Button.Width and Button.Height, but any value set for them does not increase the size of the button.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question