PDA

Click to See Complete Forum and Search --> : ERROR: COuld not load an object...


daimous
May 31st, 2006, 08:11 PM
hi! can anybody please help me..i have an axcel file with macro in it. basically the excel file has a button and when it is pressed a form will appear and in that form there are objects like textbox,button and DatePicker, but when i try to click the button (in the excel file) it gives me an error message saying "COuld not load an object becuase it is not available on this machine" as i continue i notice that the Datepicker object disappear, It could be the object that the error message referring to I think, how will solved this problem? by the way, in some computer the macro works. thanks in advance!!

RobDog888
May 31st, 2006, 08:28 PM
The issue is because the DTPicker is a VB 6 Common Control 2 - 6.0 dependancy.
So you have 3 options. On the affected systems, download the VB6 runtimes from MS and install or download them on to your system and distribute just the DTPicker support ocx (mscomctl2.ocx).

If your systems mscomctl2.ocx is updated to the latest version then you can just distribute that.

daimous
May 31st, 2006, 08:50 PM
thanks but where can i find that file? i already search it in c: drive using windows search but it found nothing.

RobDog888
May 31st, 2006, 09:26 PM
Its in C:\Windows\System32\MSCOMCT2.OCX for Windows XP.

daimous
May 31st, 2006, 10:27 PM
I already copied the MSCOMCT2.OCX file in my c:\windows\system32\ folder from other computer where the macro works but still it gives me the same error.

RobDog888
May 31st, 2006, 10:33 PM
Try registering the ocx using Regsrv32.exe.