I have a Word 2007 VBA project where I reference MS Windows Common Controls (mscomct2.ocx) so I can use the Datepicker. This has worked well for me. I took it to the office, and tested and modified the template on a PC there. I experienced no problem. Now when I open the template on my own PC, I get an error saying that an "object is not installed on this machine."
I have the ocs file stored in c:\windwos\SysWOW64.
Can anyone suggest why I don't have trouble going from home to office, but office to home creates a problem?
I'm guessing here, but I would suspect you have other controls loaded at the office that are not loaded at home. I had a spreadsheet for showing loaded controls here somewhere.
Aha! Attached the file.
You need to enable macros, then run Grab_References.
The "missing" control is the datepicker. When I open the VBA project, a message displays for each occurrence of that control in the user forms. But I can go to those forms and drag the datepicker from the toolbox.
I created this template on the home PC, so I know all of the controls in use are installed. If I had had this problem at the office, I would have been less surprised; possibly the ocx was missing there. But I had no problem running and modifying the code, so it would appear that the common control ocx was loaded there.
I'm wondering if the office had a later version of the control; it was backward compatible when I went TO the office, but not when I came FROM the office.
I think this is a backwards/forwards version issue. In my experience, if I attach a control to the oldest available version and then open the template which has a newer version of the same control then it happily upgrades. BUT, when I attach a newer control then it doesn't automatically attach the older version of the control.
I think this is forwards compatible but not backwards compatible.