Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default "Compile Error Can't find project or library."

Solver.xla was missing. I don't know why. I use solver in other code for
another sheet, but it doesn't work anymore (I guess b/c solver.xla is
missing).

Why would missing solver.xla have anything to do with "Format"? or is it
just saying, in general, that something is wrong, not necessarily with
"Format"?

Also, how could I be missing solver.xla when I use it fairly often in this
file? How do I enable it other than re-inserting the disk (I guess I could
dig it up somewhere)?

Thanks, Mike Allen

"Norman Jones" wrote in message
...
Hi Mike,

In the VBE, with the problematic workbook's project selected, go to:
Tools | References
and look for any entries marked 'Missing'.

Uncheck these if they are not needed or use the browse button to locate
the reference.


---
Regards,
Norman



"mike allen" wrote in message
...
I have a function that works fine in a workbook by itself, but when I
attempt to add that function to another workbook (simply combining 2 into
1), I get an error message:

"Compile Error Can't find project or library."

then it highlights in yellow the entire function line and highlights in
blue "Format" in the line:

maturitymonth = CInt(Format(maturity, "mm"))

The odd thing is it works fine when by itself. It only does this when I
add this function into a large workbook with other functions and subs and
worksheets. Any ideas? thanks, mike allen






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default "Compile Error Can't find project or library."

Hi Mike,

Why would missing solver.xla have anything to do with "Format"?


It is typical of missing references that (apparently) random functions are
highlighted.

How do I enable it other than re-inserting the disk (I guess I could dig
it up somewhere)?


Use Start | Find to locate the path to Solver.XLA and then , as befo

Tools | References | Browse | Navigate to Solver.XLA


---
Regards,
Norman



"mike allen" wrote in message
...
Solver.xla was missing. I don't know why. I use solver in other code for
another sheet, but it doesn't work anymore (I guess b/c solver.xla is
missing).

Why would missing solver.xla have anything to do with "Format"? or is it
just saying, in general, that something is wrong, not necessarily with
"Format"?

Also, how could I be missing solver.xla when I use it fairly often in this
file? How do I enable it other than re-inserting the disk (I guess I
could dig it up somewhere)?

Thanks, Mike Allen

"Norman Jones" wrote in message
...
Hi Mike,

In the VBE, with the problematic workbook's project selected, go to:
Tools | References
and look for any entries marked 'Missing'.

Uncheck these if they are not needed or use the browse button to locate
the reference.


---
Regards,
Norman



"mike allen" wrote in message
...
I have a function that works fine in a workbook by itself, but when I
attempt to add that function to another workbook (simply combining 2 into
1), I get an error message:

"Compile Error Can't find project or library."

then it highlights in yellow the entire function line and highlights in
blue "Format" in the line:

maturitymonth = CInt(Format(maturity, "mm"))

The odd thing is it works fine when by itself. It only does this when I
add this function into a large workbook with other functions and subs
and worksheets. Any ideas? thanks, mike allen








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default "Compile Error Can't find project or library."

The big reason for lost references are...

1. The code was developed in one version of Excel and then run on a lesser
version. For example the code referenced ADO 2.8, but was run on a machine
that only has ADO 2.7. In this case you will get the Missing designation as
2.7 does not exist on the host machine. In this case you want to dumb down
the version of the reference on the machine you are creating on, to be able
to run on the weakest host machine.

2. The code is copied from one project to another. In this case there never
was a reference made in the secong project so the error appears (without a
missing designation).

3. Code is written on one machine that has certain addins installed (such as
solver.xla) and is then run on a host amchine without the same addin's
installed. In this case you get the missing designation as the addin can not
be found.

As for the warning message it will appear on some line of code that would
otherwise compile just fine. This is just one of those wierd thing that
happens. Similar to writing code in C where one syntax error causes a whole
pile of compile errors most of which are perfectly good lines of code.

--
HTH...

Jim Thomlinson


"mike allen" wrote:

Solver.xla was missing. I don't know why. I use solver in other code for
another sheet, but it doesn't work anymore (I guess b/c solver.xla is
missing).

Why would missing solver.xla have anything to do with "Format"? or is it
just saying, in general, that something is wrong, not necessarily with
"Format"?

Also, how could I be missing solver.xla when I use it fairly often in this
file? How do I enable it other than re-inserting the disk (I guess I could
dig it up somewhere)?

Thanks, Mike Allen

"Norman Jones" wrote in message
...
Hi Mike,

In the VBE, with the problematic workbook's project selected, go to:
Tools | References
and look for any entries marked 'Missing'.

Uncheck these if they are not needed or use the browse button to locate
the reference.


---
Regards,
Norman



"mike allen" wrote in message
...
I have a function that works fine in a workbook by itself, but when I
attempt to add that function to another workbook (simply combining 2 into
1), I get an error message:

"Compile Error Can't find project or library."

then it highlights in yellow the entire function line and highlights in
blue "Format" in the line:

maturitymonth = CInt(Format(maturity, "mm"))

The odd thing is it works fine when by itself. It only does this when I
add this function into a large workbook with other functions and subs and
worksheets. Any ideas? thanks, mike allen







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default "Compile Error Can't find project or library."

Thanks so much to both of you. I do have 2 versions of excel (2000 and
2003) at work and at home.
"Jim Thomlinson" wrote in message
...
The big reason for lost references are...

1. The code was developed in one version of Excel and then run on a lesser
version. For example the code referenced ADO 2.8, but was run on a machine
that only has ADO 2.7. In this case you will get the Missing designation
as
2.7 does not exist on the host machine. In this case you want to dumb down
the version of the reference on the machine you are creating on, to be
able
to run on the weakest host machine.

2. The code is copied from one project to another. In this case there
never
was a reference made in the secong project so the error appears (without a
missing designation).

3. Code is written on one machine that has certain addins installed (such
as
solver.xla) and is then run on a host amchine without the same addin's
installed. In this case you get the missing designation as the addin can
not
be found.

As for the warning message it will appear on some line of code that would
otherwise compile just fine. This is just one of those wierd thing that
happens. Similar to writing code in C where one syntax error causes a
whole
pile of compile errors most of which are perfectly good lines of code.

--
HTH...

Jim Thomlinson


"mike allen" wrote:

Solver.xla was missing. I don't know why. I use solver in other code
for
another sheet, but it doesn't work anymore (I guess b/c solver.xla is
missing).

Why would missing solver.xla have anything to do with "Format"? or is it
just saying, in general, that something is wrong, not necessarily with
"Format"?

Also, how could I be missing solver.xla when I use it fairly often in
this
file? How do I enable it other than re-inserting the disk (I guess I
could
dig it up somewhere)?

Thanks, Mike Allen

"Norman Jones" wrote in message
...
Hi Mike,

In the VBE, with the problematic workbook's project selected, go to:
Tools | References
and look for any entries marked 'Missing'.

Uncheck these if they are not needed or use the browse button to locate
the reference.


---
Regards,
Norman



"mike allen" wrote in message
...
I have a function that works fine in a workbook by itself, but when I
attempt to add that function to another workbook (simply combining 2
into
1), I get an error message:

"Compile Error Can't find project or library."

then it highlights in yellow the entire function line and highlights
in
blue "Format" in the line:

maturitymonth = CInt(Format(maturity, "mm"))

The odd thing is it works fine when by itself. It only does this when
I
add this function into a large workbook with other functions and subs
and
worksheets. Any ideas? thanks, mike allen









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excell error "Can't find Project or Library" Project VBAProject Lost in Excel Excel Worksheet Functions 0 April 12th 07 04:42 PM
indirect.ext - "can't find project or library" error DDawson Excel Worksheet Functions 0 December 5th 06 09:52 PM
"Can't find project or library" error message Stefi Excel Programming 3 June 21st 05 08:31 AM
Trim: Excel 97 gives error "Can't find project or library" Jim Mooney Excel Programming 10 August 30th 04 08:22 PM
macro error "can't find project or library" Meinfs Excel Programming 3 September 14th 03 04:29 PM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"