Переменные надо чистить:
Public Sub CreateToolBar()
Dim pDoc As IDocument
Dim pCmdBars As ICommandBars
Dim pCmdBar As ICommandBar
Set pDoc = Application.Document
Set pCmdBars = pDoc.CommandBars
Set pCmdBar = pCmdBars.Create("MyToolBar", esriCmdBarTypeToolbar)
pCmdBar.Add arcid.File_AddData
pCmdBar.Add arcid.PanZoom_FullExtent
pCmdBar.Add arcid.PanZoom_Scale
pCmdBar.Dock esriDockRight
'///
Set pDoc = Nothing
Set pCmdBars = Nothing
Set pCmdBar = Nothing
End Sub