Compile Error

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
821
Office Version
  1. 365
Platform
  1. Windows
I have copied a workbook to another computer and every time I try to run some of the code in it I keep getting all these different Compile Errors. Possible Solutions?

Thanks as always
Jamey
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Where are you getting the errors?

What are the error messages?
 
Upvote 0
I assume that the workbook has VBA code.

Are the computers running the same version of Excel?

Also, on the computer that works, open up the VB Editor, click on the Tools menu drop-down and selected References. Make note of all the references that are checked.
Now, do the same on the other computer, and make note of all the references selected there. Are all the same ones checked? If not, you may need to check some. Sometimes, the version numbers might be slightly different, but most of the wording should be the same.
 
Upvote 0
One is "Cant find project or library"
Definitely sounds like the VBA References issue I explained in my previous post.
 
Upvote 0
When I look in the references the only thing i see different is one tho one that is not working it has MISSING in front of Microsoft Windows Common Controls. Could this be it ? If so how do I get it ? Thanks
 
Upvote 0
When I look in the references the only thing i see different is one tho one that is not working it has MISSING in front of Microsoft Windows Common Controls. Could this be it ? If so how do I get it ? Thanks
Yep, that would definitely cause that error message.

You didn't answer the question I asked about if the two computer are using the same version of Excel or not. Sometimes, if you create some VBA code or a newer version and try to run it on an older version, it won't work because you may be using newer features that weren't available in the lower versions. If creating Excel files for multiple users, I always recommend writing it on the oldest version of Excel that any of your users will be using.

In any event, here are some articles that may have you resolve your missing library:
MISSING: Microsoft Windows Common Controls-2 6.0
Missing References In VBA
 
Upvote 0
Uncheck the reference(s) markes as MISSING, save the workbook and try again.
 
Upvote 0
Yep, that would definitely cause that error message.

You didn't answer the question I asked about if the two computer are using the same version of Excel or not. Sometimes, if you create some VBA code or a newer version and try to run it on an older version, it won't work because you may be using newer features that weren't available in the lower versions. If creating Excel files for multiple users, I always recommend writing it on the oldest version of Excel that any of your users will be using.

In any event, here are some articles that may have you resolve your missing library:
MISSING: Microsoft Windows Common Controls-2 6.0
Missing References In VBA


Sorry about that It was made in Excel 2007 and both computers are 2007
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,589
Members
449,174
Latest member
chandan4057

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