title: Compile error during workbook open
body: <p>I have a workbook which uses a certain type, let's call it T, that's in a module (DLL) defined in my References -- all good.</p>
  
  <p>I created some code that's called in Workbook_Open() that will add a reference to the DLL if it's not already in the list of references. This is so I can give the workbook to someone and they won't have to deal with creating the reference by hand.</p>
  
  <p>My problem is that when I open the workbook (double-click), before Workbook_Open() gets executed (and the Refence can be set) I get thrown into the debugger which points to and complains that type T, defined in the not-yet-referenced DLL, is not defined. Well no kidding it's not.</p>
  
  <p>This seems a little chick and egg. Anyone seen this before? How did you fix it?</p>