VBA Help - Compile Error Can't find project library using Format or Left Function

bobby_smith

Board Regular
Joined
Apr 16, 2014
Messages
90
Hi Guys,

I'm trying to use some defined functions that I created back in 2014 which worked perfectly then (its been about 2 years since I used it).

Now when I use it, I get the message "Compile error: Cant find project or library.

One of the function uses format and the other use Left

In the function below, I would type =GO( ) select a cell and the result should be for example GO09.

Function GO(number) As String
GO = "GO" & Format(number, "0#")


For the one below, I would type =Fasmonths( ) select a cell and the number should be converted to months.

Function FasMonths(Estimated_Life)
If Estimated_Life < 13 Then
FasMonths = Estimated_Life
ElseIf Estimated_Life > 12 Then
FasMonths = Left(Estimated_Life, Len(Estimated_Life) - 2) * 12 + Right(Estimated_Life, 2)
End If

End Function
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Look into VBE-Tools-References and unselect references started with "MISSING:...".
Usually it's invalid reference to Ref Edit Control.
 
Last edited:
Upvote 0
Thanks a MILLION ZVI. It worked... I've been searching for solution for so long and you came to my rescue.
Thank you very much.
 
Upvote 0
I solved a problem with the “mid” function causing a compiler error using your, “Look into VBE-Tools- References and unselect references started with "MISSING:...".” However, I wasn’t given any, “Cant find project or library.” Information.

I burn a lot of time with VBA issues generated by Windows updates (or Office update with a Windows update). This “MISSING…” issue was new; usually the VBA modules are deleted from the Excel file. Can you tell me a little about what “MISSING….” is, how it gets in and if there is anything I should do?
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,302
Members
449,150
Latest member
NyDarR

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