Missing Project or Library

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

My codes used to work on old pc, but crashing on new PC

Win 2k
excel 2002 sp3

Code errors on these functions
Date
Year
Format

I have references to Funcres.xla, and atpvbaen.xla

But my error does not indicate which library I need to
point to.
 
after the problem, in the vbe go to Tools=>References and see if any
references are marked as MISSING. If so, unselect those shown as MISSING.
If you are using them, then use the browse button to fine them and fix the
reference.
 
Thnaks Tom, but it is a goofy problem, there are no
references that show as missing.


the sequence of problem as as follows

code example
dim iyear as year
iyear=year(date)

First time I run the code I get compile error missing
project or library on the word "date"

I then debug and compile and it gets past this.
I save (compiled file), close it and then re-open
and get the compile error again.

The file is my personal workbook sitting in my xlstart
folder but I can't think of any reason why that would be
an issue.


Another example is below, same crash on 1st run, but fine
after a forced compile

Sub fixme()
Dim x As String
x = Format(Now, "ddd-mmm-yyyy")
MsgBox "example time " & x
End Sub

Dave
 
You have to make sure the workbook with the problem is the active project
(not active workbook) when you go to tools = references.

you do this by selecting it in the project explorer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top