Hi Robdog,

I am having the same issue again as I was before. The problem is that when I use the menu bar buttons to run my code, the code will execute, however the next time I attempt to click the menu bar button, nothing happens. I am basically using my ThisOutlookSession as my main, where all function calls happen from ThisOutlookSession and everything ultimately returns to ThisOutlookSession to finish up. Here's my code for the entire ThisOutlookSession (sorry it is really long, but I REALLY AM IN DESPERATION!!). If an error occurs anywhere in the other functions, then a boolean flag called "quitting" is set and thus prevents any other function calls from ThisOutlookSession. Basically my program is worthless if I can't fix this problem!!

VB Code:
  1. ' PART 1 of 2
  2.  
  3. Option Explicit
  4. 'Behind ThisOutlookSession
  5. Public WithEvents oMnuTrackerSub0 As Office.CommandBarButton
  6. Public WithEvents oMnuTrackerSub1 As Office.CommandBarButton
  7. Public WithEvents oMnuTrackerSub2 As Office.CommandBarButton
  8. Public WithEvents oMnuTrackerSub3 As Office.CommandBarButton
  9. Public WithEvents oMnuTrackerSub4 As Office.CommandBarButton
  10. Public WithEvents oMnuTrackerSub5 As Office.CommandBarButton
  11. Public WithEvents oMnuTrackerSub6 As Office.CommandBarButton
  12. Public WithEvents oMnuTrackerSub7 As Office.CommandBarButton
  13. Public WithEvents oMnuTrackerSub8 As Office.CommandBarButton
  14. Public WithEvents oMnuTrackerSub9 As Office.CommandBarButton
  15. Public WithEvents oMnuTrackerSub10 As Office.CommandBarButton
  16. Public WithEvents oMnuTrackerSub11 As Office.CommandBarButton
  17. Public WithEvents oMnuTrackerSub12 As Office.CommandBarButton
  18. Public WithEvents oMnuTrackerSub13 As Office.CommandBarButton
  19. Public WithEvents oMnuTrackerSub14 As Office.CommandBarButton
  20. Public WithEvents oMnuTrackerAdd As Office.CommandBarButton
  21. Public arInfo_Close As Label
  22. Public connectionString As String
  23. Public quitting As Boolean
  24.  
  25. Private Sub SyncMnuTracker1Button(btn As Office.CommandBarButton)
  26.     Set oMnuTrackerSub1 = btn
  27.    
  28.     If btn Is Nothing Then
  29.         MsgBox "Sync. of '" & btn.Caption & "' button event failed!", vbCritical + vbOKOnly
  30.     End If
  31. End Sub
  32.  
  33. Public Sub Application_MAPILogonComplete()
  34.     Dim arStatus As Office.CommandBar
  35.     Dim CBtxt_arStatus As Office.CommandBarControl
  36.     Dim arMenu As Office.CommandBarPopup
  37.     Dim currentMenuBar As Office.CommandBar
  38.     Dim oCBmnuTools As Office.CommandBarPopup
  39.     Dim oCBmnuAddToTrackerMain As Office.CommandBarPopup
  40.     Dim oCBButtons(100) As Controls
  41.     Dim oCBmnuTrackerAdd As Office.CommandBarButton
  42.    
  43.     '<ADD A MENU ITEM>
  44.     Set currentMenuBar = Application.ActiveExplorer.CommandBars.ActiveMenuBar
  45.     currentMenuBar.Reset
  46.     Set arMenu = currentMenuBar.Controls.Add(msoControlPopup, 1)
  47.     Set oCBmnuAddToTrackerMain = arMenu.Controls.Add(msoControlPopup, 1)
  48.     Set oCBmnuTrackerAdd = arMenu.Controls.Add(msoControlButton, 1)
  49.     Set arStatus = Application.ActiveExplorer.CommandBars(Application.ActiveExplorer.CommandBars.Count)
  50.     If Not arStatus.name = "AR Tracker Status ToolBar" Then
  51.         Set arStatus = Application.ActiveExplorer.CommandBars.Add("AR Tracker Status ToolBar", msoBarTop, False, True)
  52.         Set CBtxt_arStatus = arStatus.Controls.Add(1)
  53.     End If
  54.     Set CBtxt_arStatus = arStatus.FindControl(1)
  55.    
  56.     'Set oCBmnuTools = Application.ActiveExplorer.CommandBars("Menu Bar").Controls("&Tools")
  57.     'Set oCBmnuAddToTrackerMain = Application.ActiveExplorer.CommandBars("Menu Bar").FindControl(msoControlPopup, 1, "888", True, True)
  58.     ''oCBmnuTools.Reset
  59.     'If TypeName(oCBmnuAddToTrackerMain) = "Nothing" Then
  60.     '    Set oCBmnuAddToTrackerMain = oCBmnuTools.Controls.Add(msoControlPopup, 1)
  61.     'End If
  62.     'Set oCBmnuTracker1 = oCBmnuAddToTrackerMain.Controls.Add(msoControlButton, 1, "888", , False)
  63.     With Application.ActiveExplorer.CommandBars("AR Tracker Status ToolBar")
  64.         .Left = 200
  65.         .Visible = True
  66.     End With
  67.     With arMenu
  68.         .BeginGroup = True
  69.         .Caption = "A&R Tracker"
  70.         .Enabled = True
  71.         .Visible = True
  72.     End With
  73.     With oCBmnuAddToTrackerMain
  74.         .BeginGroup = True
  75.         .Caption = "Add to AR Tracker"
  76.         .Enabled = True
  77.         '.Style = msoControlCustom
  78.         '.Tag = "888"
  79.         .Visible = True
  80.     End With
  81.     With oCBmnuTrackerAdd
  82.         .BeginGroup = True
  83.         .Caption = "Add Database to this list..."
  84.         .Enabled = True
  85.         .Style = msoControlCustom
  86.         .Visible = True
  87.     End With
  88.     With CBtxt_arStatus
  89.         .BeginGroup = False
  90.         .Width = 2000
  91.         .Caption = "AR Tracker Status: Ready"
  92.         .Tag = "AR Tracker Status ToolBar"
  93.         .Enabled = True
  94.         .Visible = True
  95.     End With
  96.    
  97.     If Not restarting Then
  98.     'Set oMnuTrackerSub1 = oCBmnuTracker1 ' Set buttons to have WithEvents
  99.         Set oMnuTrackerAdd = oCBmnuTrackerAdd
  100.         Call Populate_CB_Array(oCBmnuAddToTrackerMain)
  101.     'Call SyncMnuTracker1Button(oCBmnuTracker1)
  102.     '</ADD A MENU ITEM>
  103.     End If
  104. End Sub
  105.  
  106. Private Sub oMnuTrackerAdd_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  107.     DBadd.Show
  108. End Sub
  109.  
  110. Private Sub oMnuTrackerSub0_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  111.     Call myClick_Event(Ctrl)
  112. End Sub
  113. Private Sub oMnuTrackerSub1_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  114.     Call myClick_Event(Ctrl)
  115. End Sub
  116. Private Sub oMnuTrackerSub2_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  117.     Call myClick_Event(Ctrl)
  118. End Sub
  119. Private Sub oMnuTrackerSub3_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  120.     Call myClick_Event(Ctrl)
  121. End Sub
  122. Private Sub oMnuTrackerSub4_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  123.     Call myClick_Event(Ctrl)
  124. End Sub
  125. Private Sub oMnuTrackerSub5_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  126.     Call myClick_Event(Ctrl)
  127. End Sub
  128. Private Sub oMnuTrackerSub6_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  129.     Call myClick_Event(Ctrl)
  130. End Sub
  131. Private Sub oMnuTrackerSub7_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  132.     Call myClick_Event(Ctrl)
  133. End Sub
  134. Private Sub oMnuTrackerSub8_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  135.     Call myClick_Event(Ctrl)
  136. End Sub
  137. Private Sub oMnuTrackerSub9_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  138.     Call myClick_Event(Ctrl)
  139. End Sub
  140. Private Sub oMnuTrackerSub10_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  141.     Call myClick_Event(Ctrl)
  142. End Sub
  143. Private Sub oMnuTrackerSub11_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  144.     Call myClick_Event(Ctrl)
  145. End Sub
  146. Private Sub oMnuTrackerSub12_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  147.     Call myClick_Event(Ctrl)
  148. End Sub
  149. Private Sub oMnuTrackerSub13_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  150.     Call myClick_Event(Ctrl)
  151. End Sub
  152. Private Sub oMnuTrackerSub14_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
  153.     Call myClick_Event(Ctrl)
  154. End Sub