VBA Can't Find Project Or Library

jo15765

Well-known Member
Joined
Sep 23, 2011
Messages
591
I copied a worksheet that I use all the time on another laptop to a flash drive and copied it to a new pc. The VBA runs perfectly on the other pc but on this 2nd pc I get a VBA Compile error of Can't find Project Or Library on this line of code
Code:
                .SaveAs Filename:="C:\" & "_" & VBA.Left(ActiveWorkbook.Name, VBA.InStrRev(.Name, ".") - 1) & "_" & VBA.Format(Date, "mmddyyyy") & ".xls"

And it is highlighting the word Date...Any ideas why it works on one PC and not on another?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
in the VBE goto to tools>References
scroll down the list and there will be on which is ticked but "MISSING". untick at save the workbook.

thats it done. there must have been a 3rd party ocx on the other puta
 
Upvote 0
One would imagine the missing library is "Visual Basic for Applications" here...

sometimes for reasons that will probably never be known this library gets de-referenced.
 
Upvote 0

Forum statistics

Threads
1,223,667
Messages
6,173,684
Members
452,527
Latest member
ineedexcelhelptoday

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