Microsoft Visual Basic Compile Error Cant Find Project Or Library
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn http://stackoverflow.com/questions/507191/cant-find-project-or-library-for-standard-vba-functions more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags http://stackoverflow.com/questions/11533494/i-am-getting-compile-error-cant-find-project-or-library-in-a-only-some-excel Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “Can't find Project or Library” for standard VBA functions up vote 36 down vote favorite 12 So I'm having to run someone else's excel app find project on my PC, and I'm getting "Can't find Project or Library" on standard functions such as date, format, hex, mid, etc. Some research indicates that if I prefix these functions with "VBA." as in "VBA.Date" then it'll work fine. Webpages suggest it has to do with my project references on my system, whereas they must be ok on the developer's system. I'm going to be dealing with this for some time from others, and will be find project or distributing these applications to many others, so I need to understand what's wrong with my excel setup that I need to fix, or what needs to be changed in the xls file so that it'll run on a variety of systems. I'd like to avoid making everyone use "VBA." as an explicit reference, but if there's no ideal solution I suppose that's what we'll have to do. How do I make "VBA." implicit in my project properties/references/etc? vba excel-vba namespaces reference share|improve this question edited Jun 29 '12 at 17:57 JimmyPena 5,99932944 asked Feb 3 '09 at 14:05 Adam Davis 59.1k43211303 are you developing in one version of excel and distributing to users using a different version? –Russ Cam Feb 3 '09 at 14:13 That may be the case - I don't know which version the developers are using. I'll check. –Adam Davis Feb 3 '09 at 14:16 1 cpearson.com/Excel/MissingReferences.aspx –SmartestVEGA Dec 22 '09 at 14:05 add a comment| 4 Answers 4 active oldest votes up vote 32 down vote accepted I have seen errors on standard functions if there was a reference to a totally different library missing. In the VBA editor launch the Compile command from the menu and then check the References dialog to see if there is anything missing and if so try to add these
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up I am getting 'Compile error: Can't find project or library' in a only some Excel 2010 versions. Difficult to test this up vote 4 down vote favorite 1 My customer is getting a Compile Error; Can't find project or Library on his version of Excel 2010, however i am not getting this on my version of 2010. How can i adjust this code so it will not appear. When the error appears in the following code the text "cell" in "For each cell in selection" is highlighted: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$9" Then Columns("D:CB").Select Selection.EntireColumn.Hidden = False Application.ScreenUpdating = False Sheet17.Range("E48:CB48").Select For Each cell In Selection If cell = 0 Then Range(cell.Address).EntireColumn.Hidden = True End If Next Application.ScreenUpdating = True Sheet17.Range("b9").Select End If End Sub` My customer is also reporting a bug in the following code with the word "Response" being highlighted. This, as well, is not an issue for me, on my version of Excel 2010. Any and all help is greatly appreciated. If Sheet1.Range("E18") = 3 Then Response = MsgBox("Reminder Emails have been set to be sent automatically at " & Sheet1.Range("f18").Value & ", " & Sheet1.Range("Q4").Value & " day(s) before" & vbCrLf & "the scheduled appointment. Do you want to send reminder e-mails now anyway?", vbYesNo) If Response = vbN