ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Missing Project or Library (https://www.excelbanter.com/excel-programming/307896-missing-project-library.html)

dave

Missing Project or Library
 
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.



Tom Ogilvy

Missing Project or Library
 
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.

--
Regards,
Tom Ogilvy

"Dave" wrote in message
...
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.





dave

Missing Project or Library
 
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



-----Original Message-----
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.

--
Regards,
Tom Ogilvy

"Dave" wrote in

message
...
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.




.


Tom Ogilvy

Missing Project or Library
 
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.

--
Regards,
Tom Ogilvy

"Dave" wrote in message
...
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



-----Original Message-----
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.

--
Regards,
Tom Ogilvy

"Dave" wrote in

message
...
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.




.





All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com