|
-
May 31st, 2006, 08:11 PM
#1
Thread Starter
Fanatic Member
ERROR: COuld not load an object...
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!!
-
May 31st, 2006, 08:28 PM
#2
Re: ERROR: COuld not load an object...
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2006, 08:50 PM
#3
Thread Starter
Fanatic Member
Re: ERROR: COuld not load an object...
thanks but where can i find that file? i already search it in c: drive using windows search but it found nothing.
-
May 31st, 2006, 09:26 PM
#4
Re: ERROR: COuld not load an object...
Its in C:\Windows\System32\MSCOMCT2.OCX for Windows XP.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2006, 10:27 PM
#5
Thread Starter
Fanatic Member
Re: ERROR: COuld not load an object...
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.
-
May 31st, 2006, 10:33 PM
#6
Re: ERROR: COuld not load an object...
Try registering the ocx using Regsrv32.exe.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|