Calls shared code to create a new command bar button to rename controls on a form or report.On Error GoTo ErrorHandlerSet frmcbb = CreateFormCommandBarButton(Application, _
ConnectMode, AddInInst)
Set rptcbb = CreateReportCommandBarButton(Application, _
ConnectMode, AddInInst)ErrorHandlerExit:
Exit SubErrorHandler:
AddInErr Err
Resume ErrorHandlerExitEnd SubPrivate Sub IDTExtensibility2_OnDisconnection(ByVal _
RemoveMode As AddInDesignerObjects.ext_DisconnectMode, _
custom() As Variant)On Error GoTo ErrorHandlerCall common procedure to disconnect add-in.RemoveAddInCommandBarButton RemoveModeErrorHandlerExit:
Exit SubErrorHandler:
AddInErr Err
Resume ErrorHandlerExitEnd SubPrivate Sub IDTExtensibility2_OnStartupComplete(custom() _
As Variant)On Error GoTo ErrorHandler‘No code needed, but must have the event stubErrorHandlerExit:
Exit SubPart III Adding More Functionality to Office