Дорогие друзья-программисты, не сталкивались ли вы с идеей сделать в Excel'e панельку, которая независимо от положения прокрутки всегда будет находиться в какой-нибудь определенной части окна?
Спасибо.
F1 писал(а):Type Optional Variant. The type of control to be added to the specified command bar. Can be one of the following MsoControlType constants: msoControlButton, msoControlEdit, msoControlDropdown, msoControlComboBox, or msoControlPopup.
Id Optional Variant. An integer that specifies a built-in control. If the value of this argument is 1, or if this argument is omitted, a blank custom control of the specified type will be added to the command bar.
Parameter Optional Variant. For built-in controls, this argument is used by the container application to run the command. For custom controls, you can use this argument to send information to Visual Basic procedures, or you can use it to store information about the control (similar to a second Tag property value).
Before Optional Variant. A number that indicates the position of the new control on the command bar. The new control will be inserted before the control at this position. If this argument is omitted, the control is added at the end of the specified command bar.
Dim msBtn As CommandBarButton
On Error Resume Next
Application.CommandBars("MyCommandBar").Delete
On Error GoTo 0
Application.CommandBars.Add(Name:="MyCommandBar").Visible = True
Set msBtn = Application.CommandBars("MyCommandBar").Controls.Add(Type:=msoControlButton)
msBtn.FaceId = 366
msBtn.Caption = "Button Caption"
msBtn.OnAction = "module1.sub1"
Сейчас этот форум просматривают: Google-бот, Mail.ru [бот] и гости: 66