"Can't find Project or Libr." when using Form in Macro

C

Cae

I had the following macro working in Excel 2000, when I
used an Excel XP machine to save the file now I get the
following error when running on back Excel 2000.

"Compile Error: Can't find Project or Library"

The Macro Breaks at the following Code that uses a "Form"
to graphically display progress.

Sub UpdateProgress(pct)
With Mercury_Reporting_Package.ProgressUpdate_Form
.FrameProgress.Caption = Format(pct, "0%")
.LabelProgress.Width = pct *
(.FrameProgress.Width - 10)
.Repaint
End With
End Sub

Thank you in advance
 
J

Juan Pablo González

In Tools | References, check if you have any items marked as "MISSING"
 
C

CAE

Thanks there is a Missing Reference:

I dont know how to deal with/correct it?

The missing reference is "Microsoft ActiveX Data Objects
(Multi-Demensional) 2.7 Library"


In Tools | References Missing
 
J

Juan Pablo González

Do you know if you're using ADO for anything ? Database connections ? sql
queries ? if not, then try unchecking that reference and run the macro(s)
again to see if the run ok.

--
Regards

Juan Pablo González

Thanks there is a Missing Reference:

I dont know how to deal with/correct it?

The missing reference is "Microsoft ActiveX Data Objects
(Multi-Demensional) 2.7 Library"


In Tools | References Missing
 
E

Ed

Part of the problem is that when you run the file on the XP machine, VBA may
automatically update the library reference from 2000 (Excel 9.0) to XP
(Excel 10.0). When the file is saved, it may be saved to the Excel 10.0
library, and that won't be found on your 2000 machine. If you're going to
be going back and forth from 2000 to XP on a regular basis, you probably
want to try late binding - it causes the code to look for the application
object and set a reference, rather than having the object reference set at
the beginning. (I think I explained that right.)

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top