Could Not Load Object

Rocky0201

Active Member
Joined
Aug 20, 2009
Messages
278
Hi...

I created a VB project using Excel 2007. Except for some errors in my code, the project launches correctly.

I copied the spreadsheet to my system running Excel 2010. When the code first tries to show UserForm1, I get "Could not load an oblject because it is not available on this machine.

I read another post here on MR. Excel and looked at the references under tools in the VBA project. The only difference is that in 2007, I am running Microsoft Excel 12.0 Object Library, Mircosoft Office 12.0 Object Library and in 2010 both of these library's are 14.0.

Now, early on durning my development of the VBA project in 2007, I was using the Calendar reference. I had since un-checked this reference and removed any code that I once had using the Calendar.

Other than that, I am not certain what object 2010 is not available.

Please help...

Thanks.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
does it highlight any particular line of code?

hard to say without seeing your code and what you are referancing. sounds more like a object that isnt in it not a referance to a libaray.

ie a form that doesnt exsist or sheet or something
 
Upvote 0
Did you remove the Calendar control from the form? 2010 does not come with the Calendar control, which is probably the issue (regardless of reference).
 
Upvote 0
Thanks folks for responding.

To answer your questions; there is no additional information as to which object is missing or which line of code is in error. The dialog box comes up as soon as the worksheet is activated. Once I press OK, the application seems to run properly.

I did remove the Calendar references. That did not seem to help.

What I did do however, yesterday I purchased MS Office 2010 and loaded this onto a spare laptop. I was able to create the same condition. I went into the Excel Options, navigated to the Macro Settings and select "Trust access to the VBA project object model". The Dialog box did not appear after that.

Hopefully, this was the problem.

Thanks again for the help!!!
 
Upvote 0
it could be that it was trying to use an object that wasnt trusted to use. otherwise something in the worksheet open event if it happens right away
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top