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