Featured post
"Object Library invalid or contains references..." in Excel VBA with DatePicker -
i have been working on excel workbook lots of vba code while , have send file colleagues testing , not work in computer. work in same company , have windows xp sp2 office 2003.
the workbook has form opens when clicking on shape , contains controls. when click on shape form show following error appears:
"object library invalid or contains references object defintions not found"
in form there datepicker , think there lies problem. if delete datepicker form , send them file again not error message.
i tried deleting mscomct2.exd file mentioned in 2 sites "microsoft" , "lessanvaezi" error stil pops. checked , new .exd file generated.
some additional info:
- i check system , have file mscomct2.ocx in correct location(c:\winxp\system32).
- if open empty excel file, go vba editor go tools->reference, not see option register "microsoft common control-2 6.0 (sp6)" (mscomct2.ocx). instead see "microsoft windows common controls satellite-3 6.2)" (cmct3de.dll).
- i send collegue file datepicker, without reference "microsoft common control-2 6.0 (sp6)". before clicking shape , opening form tried reference mscomct2.ocx library dinamically following code. referenced "microsoft common control-2 6.0 (sp6)" error still pops.
sub registerctl()
'mscomct2.ocx strguid = "{86cf1d34-0c5f-11d2-a9fc-0000f8754da1}" thisworkbook.vbproject.references.addfromguid guid:=strguid, major:=1, minor:=0
end sub
- if go form in vbe editor , rightclick on toolbox , go additional controls add "microsoft date , timepicker" control, see option listed 2 times. unfortunatelly regarless of wich 1 cchose, behaviour same: datepicker symbol added in toolbox, when drag control form, msgbox pops saying control not available.
has idea wrong? can make run in computer?
i appreciate help.
edit:
the computer problem has been upgraded wont able find specific solution case. i'm choosing archers solution has helped people (most upvotes).
i have same problem too. http://support.microsoft.com/kb/957924/en-us delete .exd files make program work!
go command prompt , type following dos commands:
code:
cd \documents , settings
del /s /a:h /a:-h *.exd
- Get link
- X
- Other Apps
Comments
Post a Comment