vba加载项按钮

加载项增加按钮

Private Sub workbook_add()
    With Application.CommandBars("standard").Controls.Add
    .Style = msoButtonCaption
    .Caption = "打印"
    .OnAction = "模块1.Macro1"
    End With

End Sub

你可能感兴趣的:(vba)