Solved

Excel 2010 "Can't find Project or Library"

Posted on 2013-11-27
3
487 Views
Last Modified: 2013-12-06
I have a worksheet that worked fine in XP Pro but fails in Windows 7 at the "trim(str(.,.)"
at the bottom of this snipppet saying "Can't find Project or Library". I thought trim and str were internal functions.

Thanks for any help and happy thanksgiving!

Private Sub cmdOutPut_Click()
Dim fname As String
Dim TParkId As String
Dim wsTabFile As Worksheet
Dim rngInput As Range
Dim rngDepDate As Range
Dim a As Currency
Dim i As Integer
Dim j As Integer
Dim vData As Variant
   
  Set wsTabFile = Worksheets("Computer")
  Set rngInput = Range("tblInput")
  Set rngDepDate = Range("depDate")
 
  TParkId = wsTabFile.Range("PropNum")
  fname = "\OT" & Trim(Str(Month(rngDepDate))) & Trim(Str(Day(rngDepDate)))
Trim(Str[(Year(rngDepDate))) & "R" & Range("ReportNum") & ".txt"
0
Comment
Question by:rjfields
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 39682454
Stop the macro and from the VBA window

go to  Tools > Referenced
Here you will find a list of libraries with the top few libraries "Checked"
Among the checked libraries you will find one starting with "MISSING..."
Either you will have to look further down the list for a similar library having a different librari
Or you would have to download the appropriate library.
In any case you would have to check the appropriate library and uncheck the missing one.
0
 
LVL 11

Expert Comment

by:SeanStrickland
ID: 39683793
For reference, here's the MS Knowledge Base article on this:
http://support.microsoft.com/kb/283806

The functions you referenced are "internal" in the sense that they're housed in an object library for Excel that's "checked" by default in the references page.  If the KB article doesn't work, try unchecking the MS Excel Object Library that's already marked, saving your changes, and "re-checking" it.

If it's not checked in yours, you may want to just scroll down in the Tools -> References dialog and look for the MS Excel Object Library ##.# (highest number) and try that.

References are tricky sometimes and I've had them give odd errors in the past since Access 2007 (Good 'ole Access '97 never gave those errors!!!). :)

Sean
0
 
LVL 11

Expert Comment

by:SeanStrickland
ID: 39683795
Referencing Access because that's where I do most of my VBA coding, by the way -- still relevant to Excel.  (for clarity) :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question