Macro Error

hsk

Well-known Member
Joined
Oct 19, 2006
Messages
567
I have written a macro which pops up a user form. User form contains sreadsheet control where user provides certain inputs. My macro reads those inputs and processes further.

It is working parfect for me. I am using excel 2003. I sent this macro to my team members in different location. They are using office 2007. On running Macro throws error like ----

1. Can not find project or library
2. Pops up a msgbox for VBAProject password(users obviously do not have password)
3. Could not load object because it is not available on this machine
4. Compile error in the hidden module:Thisworkbook


Any body can help me on this?
How can I get this run? I can not go to user location to see exactly what's going wrong, nor can I share the password with users and ask them to debug the issue. Can I make some arrangement in code to find what is the cause of
"Can not find project or library" ....


Please help !!!!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
On a 2007 machine go into the code (Alt+F11)
Tools | References. Look for anything marked as MISSING. Uncheck, then go down the list to find the latest available version of that library and select the check box.
OK, and you should be up and running.

Note: *Sometimes* you will be unable to choose the replacement library without closing the dialog and re-opening it. Something to do with refreshing the list

Denis
 
Upvote 0
Hi hsk,

The error message is to do with the fact that the directory path for some of Excel 's program files changes between version releases causing their links to break.

To (hopefully) fix the problem, try these five steps on each machine running Excel 2007:

1. Open the file on the machine running 2007
2. Open the Visual Basic Editor (VBE) by pressing Alt + F11
3. From the Tools menu click References
4. Un-tick (de-select) any reference that says 'MISSING' from the References - VBAProject and then click OK
5. Exit the VBE by pressing Alt + Q

HTH

Robert
 
Upvote 0
Thanks Denis ...

Can I put some code in my macro itself to this?
It sounds very simple and just one time activity but I really doubt users will be interested in doing it.
I have to automate it, is there any way to specify which all Lib's I am going to use ??

Thanks ..
 
Upvote 0
Thanks Robert for your inputs ..

I am just searching for a way to do this automatically, Because this macro is going to n number of users. Every person may have different setup.

Any idea ?
 
Upvote 0
Any idea ?

No, not by macro I'm afraid as programming to the VBE requires two key settings to be changed manually (see this detailed article by Chip Pearson for more info) which defeats the purpose.

The only thing I can suggest is that as well as having Excel 2003, you get Excel 2007 loaded on your PC, ensure your workbook works on that platform and then email the applicable version the the relevant people (or both versions if you're not sure who is running which version).

HTH

Robert
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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