_ name As String) As
Public Function AddCustomButton(panel As CommandBar, _ name As String) As CommandBarButton 'Добавляет на панель кнопку, 'возвращая объект CommandBarButton в качестве результата Dim ctrl As CommandBarButton If Not ExistControl(panel, name) Then Set ctrl = panel.Controls.Add(Type:=msoControlButton) ctrl.Caption = name End If Set AddCustomButton = panel.Controls(name) End Function |
Листинг 3.16. |
Закрыть окно |