![]() |
"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 |
"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 |
"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 |
"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 |
All times are GMT +1. The time now is 04:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com