title: "Object Library invalid or contains references..." in Excel VBA with DatePicker
body: <p>I have been working on a Excel workbook with lots of VBA code for a while and now I have send this file to some colleagues for testing and it does NOT work in their computer.
  We all work in the same company and have Windows XP SP2 with Office 2003.</p>
  
  <p>The workbook has a form that opens when clicking over a shape and it contains some controls.
  When they click over the shape for the form to show the following error appears:</p>
  
  <blockquote>
    <p>"Object Library invalid or contains
    references to object defintions that
    could not be found"</p>
  </blockquote>
  
  <p>In the form there is a DatePicker and I think there lies the problem.  If I delete the datePicker from the form and send them the file again they do not get this error message.</p>
  
  <p>I already tried deleting the mscomct2.exd file as mentioned in this two sites "<a href="http://support.microsoft.com/kb/290537" rel="nofollow">Microsoft</a>" and "<a href="http://www.lessanvaezi.com/delete-exd-files-to-fix-object-library-invalid-error/" rel="nofollow">lessanvaezi</a>" but the error stil pops.  I checked and the new .exd file was generated.</p>
  
  <p>Some Additional info:</p>
  
  <ol>
  <li>I check their system and they do have the file mscomct2.ocx in the correct location(c:\Winxp\System32).</li>
  <li>If I open a empty Excel file, go to the VBA editor go to Tools->Reference, I do NOT see the option to register the "Microsoft Common Control-2 6.0 (SP6)" (mscomct2.ocx). Instead I see a "Microsoft Windows Common Controls Satellite-3 6.2)" (cmct3de.dll).</li>
  <li>I send my collegue the file with the datePicker, but without the reference to the "Microsoft Common Control-2 6.0 (SP6)".  Before clicking the shape and opening the form I tried to reference the MSCOMCT2.ocx library dinamically with the following code.  It referenced the "Microsoft Common Control-2 6.0 (SP6)" but the error still pops.</li>
  </ol>
  
  <blockquote>
    <p>Sub RegisterCtl()</p>
  
  <pre><code>'MSComCt2.ocx
  strGUID = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}"
  ThisWorkbook.VBProject.References.AddFromGuid guid:=strGUID, Major:=1, Minor:=0
  </code></pre>
    
    <p>end Sub</p>
  </blockquote>
  
  <ol>
  <li>If I then go to the form in the VBE editor and rightClick on the
  toolbox and then go to the
  Additional controls to add the
  "Microsoft Date and TimePicker"
  control, I see that option listed
  Two times.  Unfortunatelly regarless
  of wich one I cchose, the behaviour
  is the same: The datepicker symbol
  is added in the toolbox, but when I
  drag the control to the form, a
  msgBox pops saying that the control
  was not available.</li>
  </ol>
  
  <p>Has anybody an idea what is wrong? What can I do to make it run in their computer?</p>
  
  <p>I appreciate any help.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>The computer with this problem has been Upgraded so I wont be able to find the specific solution for my case.  I'm choosing Archers solution as it has helped the most people (Most Upvotes).</p>