title: RubberDuck Parse Error on Initial Refresh
body: <p>I installed RubberDuck and opened an Access 2007 Database I use as a code testing ground. When I click Refresh on the RD toolbar, the text continued to say <code>Pending</code>. After several click on the refresh button I open <code>Settings</code> and unchecked/Rechecked a random checkbox and clicked <code>Ok</code>. At that point my Refresh Button text showed <code>Parse Error</code>.</p>
  
  <p>I then closed all instances of MS Access and re-opened the database. I changed the minimum logging level to <code>INFO</code>, and clicked the Refresh Button.</p>
  
  <p>I do have an error in my log, but the Refresh Button still says <code>Pending</code>.</p>
  
  <p><strong>Rubberducklog.txt:</strong></p>
  
  <pre><code>2017-10-26 11:10:35.3473;INFO-2.1.1.2431;Rubberduck.Common.LogLevelHelper;
      Rubberduck version 2.1.1.2431 loading:
      Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 x86
      Host Product: 2007 Microsoft Office system x86
      Host Version: 12.0.6423.1000
      Host Executable: MSACCESS.EXE;
  2017-10-26 11:10:35.7613;INFO-2.1.1.2431;Rubberduck.UI.Command.VersionCheckCommand;Executing version check.;
  2017-10-26 11:10:58.7656;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (1) is invoking StateChanged (Pending);
  2017-10-26 11:10:58.7746;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 5).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
     at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr&amp; ppTarget, Boolean&amp; pfNeedsRelease)
     at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
     at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
     at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
     at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
     at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
     at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
     at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 555
     at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
  2017-10-26 11:10:59.1217;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (2) is invoking StateChanged (Error);
  </code></pre>
  
  <p><strong>Revised to include error log from MS Excel 2010:</strong></p>
  
  <pre><code>2017-10-26 12:17:41.2597;INFO-2.1.1.2431;Rubberduck.Common.LogLevelHelper;
      Rubberduck version 2.1.1.2431 loading:
      Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 x86
      Host Product: Microsoft Office 2010 x86
      Host Version: 14.0.7188.5000
      Host Executable: EXCEL.EXE;
  2017-10-26 12:17:41.8027;INFO-2.1.1.2431;Rubberduck.UI.Command.VersionCheckCommand;Executing version check.;
  2017-10-26 12:17:42.2597;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (1) is invoking StateChanged (Pending);
  2017-10-26 12:17:42.2737;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 6).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
     at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr&amp; ppTarget, Boolean&amp; pfNeedsRelease)
     at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
     at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
     at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
     at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
     at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
     at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
     at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 555
     at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
  2017-10-26 12:17:42.8447;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (2) is invoking StateChanged (Error);
  2017-10-26 12:17:56.3117;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (3) is invoking StateChanged (Pending);
  2017-10-26 12:17:56.3117;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 7).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
     at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr&amp; ppTarget, Boolean&amp; pfNeedsRelease)
     at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
     at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
     at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
     at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
     at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
     at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
     at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 559
     at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
     at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
  2017-10-26 12:17:56.3117;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (4) is invoking StateChanged (Error);
  </code></pre>