Fixing Compile Error: Project Or Library Cannot Be Found

Nov 6, 2007

I have currently written a macro in excel 2003, it doesn't run on excel 2007, or some versions of 2003, I realize this is due to missing references, I was curious if there is any way to write code to actually prompt or install these references using VB. This way novice users can use the macro by themselves.

At the moment it fails on code such as

ans = MsgBox("??", vbYesNoCancel, "Title")
saying ans is not found
"Compile Error: Project or Library cannot be found"

I can avoid these errors by dimensioning everything as a string or variant. BUt doing this will use more memory which is not desired at the moment as it sometimes exhuast available memory on some machines.

View 9 Replies


ADVERTISEMENT

Compile Error: Can't Find Project Or Library

Apr 28, 2009

I have a workbook that is used by a number of different users accross the company. Some people have PC's running Windows 2003 SP3, some have terminals with either

- Windows 2000 SP4 with Excel 2002 SP3

or

- Windows 2003 SP2 with Excel 2002 SP3
on the server.

On the "Windows 2003 SP2 with Excel 2002 SP3" example the code below won't run.

Saying "Compile Error in hidden module." I unlocked the code and re-ran the "Workbook_Open" event but I keep getting "Compile Error: Can't find project or library". I have then checked the references but none have the "Missing" prefix, so I don't know which to look for. Does anyone know what DLL i need to load or should I just get IT to updgrade to SP3?

Code: ....

View 9 Replies View Related

Compile Error - Can't Find Project Or Library

Jul 24, 2007

I am working on a form in VB and when I try to enter data into Textboxes (which all have either a currency format or date format) I get an error that says "Compile Error - Can't find project or library". I think the problem may be that I need additional references uploaded onto my VB but am not sure. Any Ideas?

View 6 Replies View Related

Excel 2010 :: Compile Error - Can't Find Project Or Library

Mar 4, 2014

One of our employees has wrote a VB project in excel 2010 which works on some machines and not others, it comes up with the below error message.

I have checked VB and there are no missing references.

Compile Error: Can't find project or library

Private Sub UserForm_Initialize()
'Empty ClientCodeComboBox
Me.ClientCodeComboBox.Clear

[Code] .....

View 14 Replies View Related

Date Function Returns Compile Error- Cant Find Project Or Library

Oct 1, 2006

I have the following

Private Sub Workbook_Open()
Worksheets("Sheet1"). Range("L5").Value = Date
End Sub

When i try and run the code it returns an error saying: "Compile Error, Cant Find Project Or Library" and it highlights the word "Date"

View 7 Replies View Related

Compile Error "Can't Find Project Or Library"

Jun 11, 2009

HI everyone I modified my code alot and now it is erroring out on me. This button in question basically saves the information collected to a new spreadsheet. But it errors at right at the start. Compile Error: Can't Find project or library.

View 3 Replies View Related

"Compile Error: Can't Find Project Or Library"

Apr 30, 2007

Below is a string of code that used to previously work in my excel workbooks. Currently, I have been receiving the following message: "Compile error: Can't find project or library" when it reaches the SolverReset. Solver has been added to my excel version, but I still can't figure out why it isn't working. I have looked through the references and noticed that the Solver is missing within VBA, unfortunately, I cannot seem to add the reference back in, it is no longer on the list of references.

Sub Macro1()
Dim myNum As Long
Dim answer As Byte
Sheets("Data Sheet").Select
For myNum = 2 To 42
SolverReset
SolverOk SetCell:="$C$" & myNum, MaxMinVal:=3, ValueOf:="0", ByChange:="$E$" & myNum
answer = SolverSolve(True, "ShowTrial")
SolverFinish KeepFinal:=1
Next myNum
End Sub

View 3 Replies View Related

"Compile Error: Can't Find Project Or Library"

Jun 5, 2007

For some reason, I'm getting a "Compile Error: Can't Find Project Or Library" error on things that I shouldn't. So far, I've gotten this on Left(), Right() and Format(). I downloaded an example form from somewhere, and I noticed that it uses Format() without any problems, but if I use it (even if I just copy and paste they're code into my project file) it gives the above error. What I'm wondering is if there is a fix, or some reason why I'd have this problem on one file and not another. Then, more importantly, is there any kind of work around, for example I happened to read on another unrelated thread that xl97 doesn't have a Replace() function, but you could use the worksheet function: application.worksheetfunction.substitute(text, " ", "_") instead. Is there anything like this for Left(), Right() and Format()?

View 2 Replies View Related

Library File Name: "Complier Error: Cann't Find Project Or Library

Mar 22, 2007

I am using Mid function in my program. During execution, i am getting the waring message of "Complier Error: Cann't find project or library".I am not able to find the what is the reason behind on it. If really the library file missing.

View 3 Replies View Related

Trap Can't Find Project Or Library Error

Jul 6, 2007

I am using the calendar control on a form of mine, which i believe requires ms access to be installed to use(from what ive read). This is fine as most of the PC's it will be run on have this installed. However if it is run on a PC that doesnt have ms access it gives me the "Could not load an object because it is not avaliable on this machine" and then "cant find project or library error". How can I trap this error ? Ive tries whe the workbook opens, and when the form initializes but it just brings up that error

View 2 Replies View Related

Compile Error - Can't Find Object Or Library

Nov 6, 2009

I am trying to run a macro that i have copied from another workbook (which works fine) and when i try to run the macro i am getting a 'compile error' which says "Can't Find Object or Library" and takes into VB editor which highlights the word "Trim", which is part of a formula. What does this mean? I can't understand why the same macro will work in another workbook but not in this one. Below is the full code, I would have attached the workbook but it would not work for you as it opens and saves files that you would not have. Hopefully someone can understand from the code.

View 10 Replies View Related

Excel 2003 :: Can't Find Project Or Library Error With VBA Script

May 25, 2014

It works fine with several versions of Excel (2003, 2010, and 2013). But the problem arises when I move from Windows XP to Windows 7 or 8.

I use a scanner to scan barcode serial numbers into a textbox, and then populate these serial numbers with other associated data into a spreadsheet. The serial numbers are supposed to be separated by each line and placed into an array.

I get a compile error "Cant find project or library" with CHR highlighted in blue from this line of code...

SNs = Split(Str, Chr(10))

Once again, it works fine on many machines with XP, but not on Win 7 or 8.

[Code] .....

View 4 Replies View Related

Excel 2013 :: VBA Error When Upgraded - Cannot Find Project Or Library

Jun 29, 2014

I have the below code which was working at work using Excel 2010. We have upgraded to Office 2013 and it no longer works

Error: Compile Error. Cant find Project or Library

It does highlight this : If Right(varFile, 4) = ".xls" Then

Code:
Sub PropertyName_SAVEAS()
Sheets("Menu").Select
Range("I27").Select
Dim varFile As Variant
Dim strFileNameDefault As String

On Error Resume Next

[Code] .......

View 2 Replies View Related

Vba Macro Error: Compile Error Named Argument Not Found

Apr 26, 2006

I have some code that, although works fine in Excel 2003, does not in Excel 1997. I receive this error when I try running it:

COMPILE ERROR:
NAMED ARGUMENT NOT FOUND

Sub HPVAL()
Dim r As Range, myStr As String
myStr = "HP"
Set r = Cells. Find(What:=myStr, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If Not r Is Nothing Then
r = r.Value
While Not r Is Nothing
Set r = Cells.FindNext(r)
If Not r Is Nothing Then
r = r.Value
End If
Wend
End If
End Sub

It looks like Excel is getting hung up on the "SearchFormat:=" portion of the code.

View 2 Replies View Related

Compile Error - Method Or Data Member Not Found

Feb 27, 2012

trying to convert an excel document to an XML document and am getting the above error. Microsoft Visual Basic highlights below.

Code:

' prompt user to save to a directory
With frmAuthenticate.dlg
.Filter = "XML Files |*.xml|"

[Code]....

View 9 Replies View Related

Compile Error: Method Or Data Member Not Found

Jul 3, 2009

This macro is part of the Pertmaster Risk Expert Application: It was not created by me nore modified by me, it is part of the PertMaster Risk Expert Software:

I am trying to run the Convert Lags To Tasks Macro Ver. 1.3 but i keep getting the following Error Message: Compile error: Method or Data member not found

Here is the list of the codes for the macro: I have not change any codes from the original pertmaster file....

View 9 Replies View Related

Can't Find Project Or Library ...

Nov 19, 2008

is if I F8 through the code it works fine. But when I run the code through the button on the spread sheet. It stops at the Format comand. And says "Can't Find Project or Library." Has anyone ran into this issue or know how to solve it.....

View 2 Replies View Related

Can't Find Project Or Library

Feb 13, 2010

I am getting a complie error that I did not get when the code was written. Earlier versions of the same workbook still work fine without error. I hope thie workbook is not corrupted.

The error happens with the None command in this code for a button in a user form.

View 6 Replies View Related

Find The Project Or Library

Dec 15, 2002

I have written a program in VBA. When I run this program on other computer VB showes "Can't find project or library" error and all of the the common function like "Str" and "Left" and... are not known by BVA. I think I know the reason I have a missing references in my program.

first , can I check it before runing the program by a macro?
second, How can I solve the error?

View 9 Replies View Related

Can't Find Project Or Library ..

Nov 30, 2006

I have some project that works on my computer and doesn't work on other. When I run it on other computer it fail on functions right and mid, and throw "Can't Find Project Or Library". What the problem and how I may be sure that my project will run on other computers?

Fail on row:
ext=Right(sel,1)

My computer: Windows XP, Excel 2003
Failed computer: Windows 2000, Excel 2000

View 3 Replies View Related

"compile Error: Method Or Data Member Not Found",

Mar 30, 2007

If Sheet6. Range("O8").Value = 4 Then
For Each cell In Sheet10.Range("B5", "B369")
If (cell.Value = Sheet6.Range("L24").Value) Then
cell.Offset(0, Sheet6.Range("L21").Value).Value = Sheet1.ActiveCell.Value
End If
Next cell
End If

it says the part of code causing the error is the end of the 'cell.offset' part, as highlighed: Sheet1.ActiveCell.Value. i tried replacing it with '.Selection', still get the same error.

View 4 Replies View Related

Compile Error: .Left Margin "method Or Data Member Not Found"

Jul 4, 2006

I'm getting a compile error whenever It gets to the .leftmargin line...its the "method or data member not found" compile error

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""

With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""

When I comment the margin stuff out, everything else is forrmated correctly, the landscape and all. It really doesn't that "application to inches."

View 9 Replies View Related

Excel 2007 :: Cannot Find Project Or Library

Aug 15, 2013

Why does this code no longer work? It gives me the error code Cannot find project or library and MyMsg = is highlighted in blue. This worked in 2003, but does not seem to like 2007 version of excel.

Sub Send2()
'This is the "Send to XX" button

MyMsg = "Did you remember to name and save this file to your computer?"
Response = MsgBox(MyMsg, vbYesNo, Attention)
Select Case Response
Case Is = vbNo

[Code] .....

View 9 Replies View Related

Color Function: Can't Find Project Or Library

Sep 11, 2007

I am trying to utilise the color function code i have previously asked for help with on this site in a new spreadsheet i have included the code below for your reference. I am utilising the following formula to total the numbers in the cells coloured =colorfunction(J1,E1:E26,True)

Excel keeps returning the following error 'cant find project or library'

Option Explicit

Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean)
Dim rCell As Range
Dim lCol As Long
Dim vResult
lCol = rColor.Interior.ColorIndex
If SUM = True Then
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = WorksheetFunction.SUM(rCell, vResult)
End If
Next rCell
Else
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = 1 + vResult
End If
Next rCell
End If
ColorFunction = vResult
End Function

View 9 Replies View Related

Excel Macro From 2003 To 2010 - Can't Find Project Or Library

Feb 8, 2013

I have got an issue. in MSE 2003, this beginning of macro worked:

Sub Consolide()
MYFOLDER = "D:DATAMypath"

In MSE 2010, it gives me an error: "Can't find project or library"

I really know that my path is defined fine, because it worked perfect before MS update.

View 1 Replies View Related

Name Conflicts With Existing Module, Project Or Object Library. Adding Reference

Oct 5, 2007

In a workbook made in Excel 2003, I have the following for a UserForm:

Private Sub UserForm_Activate
Me.Calendar1.Value = Date
End Sub

I copied this workbook to a computer with Excel 2007 and it bombs out at "Date"
It comes up with a compile error, "Can't find project or library"

In the references window (Tools, References) it has the "Missing: Ref Edit Control" checked and the location at the bottom of this window states "C:Program FilesMicrosoft OfficeOffice11REFEDIT.DLL".

The reference to Office11 is from the computer with Office 2003 as the computer with Office 2007 has Office12.

There is another "Ref Edit Control" in the References window and when I check it and browse to the Office12 folder, highlight REFEDIT.Dll and click on open and in the references window on OK it comes up with "Name conflicts with existing module, project or object library". I have tried to delete the "Missing: Ref Edit Control", change the priority and change the reference in the missing control to Office12 but all to no avail.

How can I change the reference to the Ref Edit Control from Office11 to Office12?

View 3 Replies View Related

Copy And Paste Special Values But Getting Error 'Compile Error - Expected Function Or Variable'

Feb 7, 2007

I am trying to run create a simple macro that copies and paste special values - something I have done 100's of times but for some reason I keep getting an error message - even though I recorded the macro and didnt write it by hand - see below:

Sub Macro6()
Cells.Select
selection.Copy
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

For which I get 'Compile Error - Expected Function or Variable'

View 6 Replies View Related

Error Message (Compile Error, Procedure Too Large)

May 20, 2009

I am looking for a more efficient way to write a macro (a sample from the macro is below). This is just the first part of the macro. I need to repeat these same steps (seen for row 5 below) for rows 5 to 50. My script worked until I hit row 35 and then I got the "compile error.." message. There must be a way to use "loop" to write this more efficiently, no?

View 14 Replies View Related

Compile Error Syntax Error In Macro

May 17, 2014

VB:
Selection.FormulaArray = _
"=IF(RC[-7]=""Weekly"",RC[-1],IF((ParentCode=RC[-10])*(ClassType=""Active""),IF((EndDate=EOMONTH(EndDate,0))*(RC[-7]
={""Monthly"",""Quarterly""}),RC[-1],0),IF(RC[-7]=""Daily"",IF(SUMPRODUCT(((ParentCode=RC[-10])*(FundType=""C"")*
(ClassType=""Inactive Class"")*(TermDate<>"""")*(TermDate>=StartDate)*(TermDate<=EndDate))+((ParentCode=RC[-10])*

[Code] .....

I recorded macro for this formula its giving me syntax error i did " _" after the break but its still not working..

View 4 Replies View Related

Macro: Compile Error - Syntax Error

Feb 1, 2010

"Compile error - Syntax Error"

and the following line highlighted in yellow

"Sub CreateWorkbooks()"

It worked on Excel 2000 but not now and dont work either in Excel 2007.

Heres the complete code .....

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved