Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.
Function AddToolbarButton(Caption As String, _ toolTip As String, macroName As String, _ Optional toolbarName As String = "Standard", _ Optional FaceID As Long = 325) Dim objBar As Office.CommandBar Dim objButton As Office.CommandBarButton Set objBar = ActiveExplorer.CommandBars(toolbarName) Set objButton = objBar.Controls.Add(msoControlButton) 'objBar.ButtonClick With objButton .Caption = Caption .OnAction = macroName .TooltipText = toolTip .FaceID = FaceID .Style = msoButtonIconAndCaption .BeginGroup = True End With End Function Sub maketoolbarbutton() Call AddToolbarButton("My button", "Click here", "callmacro") Call AddToolbarButton("My button 2", "Click here", "callmacro") End Sub [b]'here is I want callmacro to determine which button was clicked [/b] Sub callmacro 'if command button name = some name then 'do something here 'end if end sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.