- Код: Выделить всё
Dim Bt As CommandBarControl
'On Error Resume Next
If Application.CommandBars("Form_Bar").Controls.Count <= 1 Then
Application.CommandBars("Form_Bar").Delete
Exit Sub
End If
Application.CommandBars.ActionControl.Delete
- Код: Выделить всё
Dim Bt As CommandBarControl
'On Error Resume Next
If Application.CommandBars("Form_Bar").Controls.Count <= 1 Then
Application.CommandBars("Form_Bar").Delete
Exit Sub
End If
For Each Bt In Application.CommandBars("Form_Bar").Controls
If Bt.Caption = Application.CommandBars.ActionControl.Caption Then Bt.Delete (True)
Next
Bt.Delete ругается что “Method Delete failed”
Спасибо!