Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trim: Excel 97 gives error "Can't find project or library"
I don't know why Trim(...) function does not work in the
Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
Hi,
Try Name=WorksheetFunction.Trim(Name) Kind regards. -- Haldun Alay "Jim Mooney" , iletide sunu yazdi ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
Jim,
Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
This solution did not work
"Haldun Alay" wrote: Hi, Try Name=WorksheetFunction.Trim(Name) Kind regards. -- Haldun Alay "Jim Mooney" , iletide sunu yazdi ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
The References Option is greyed out and I am unable to select it.
"Bob Phillips" wrote: Jim, Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
I did encounter a similar problem with Excel 2003 when using the Option
Explicit statement at the beginning of the program. I had a ClearSheet subroutine which used statements like: Range("A2:J345") = xlClearContents This statement works when not using the Option Explicit statement but does not when I use the Option Explicit statement. Does Excel 97 have this option automatically enabled and if so is there a way to disable it? Or is there another solution to this problem? "Bob Phillips" wrote: Jim, Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
I tried again and it worked. I must have misspelled it the first time.
"Jim Mooney" wrote: This solution did not work "Haldun Alay" wrote: Hi, Try Name=WorksheetFunction.Trim(Name) Kind regards. -- Haldun Alay "Jim Mooney" , iletide sunu yazdi ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
Hi Jim,
The References Option is greyed out and I am unable to select it. This would happen if you are in break mode - press the macro reset button and then try Bob's suggestion. --- Regards, Norman "Jim Mooney" <Jim wrote in message ... The References Option is greyed out and I am unable to select it. "Bob Phillips" wrote: Jim, Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
it actually errors (with option explicit) because there is no predefined
constant xlClearContents if he declared Dim xlClearContents as Variant then it would work fine althought the use of the clearcontents method (as you point out) is the provided method and probably should be employed. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Jim, The use of Option Explicit is optional but *highly* desirable. To set the default to non-use, in the VBE : Tools | Options | Editor | Require Variable Declararion <== Uncheck With Option Explicit invoked, Range("A2:J345") = xlClearContents errors because,syntatically, this should be: Range("A2:J345").ClearContents Regards, Norman "Jim Mooney" <Jim wrote in message ... I did encounter a similar problem with Excel 2003 when using the Option Explicit statement at the beginning of the program. I had a ClearSheet subroutine which used statements like: Range("A2:J345") = xlClearContents This statement works when not using the Option Explicit statement but does not when I use the Option Explicit statement. Does Excel 97 have this option automatically enabled and if so is there a way to disable it? Or is there another solution to this problem? "Bob Phillips" wrote: Jim, Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 gives error "Can't find project or library"
How many are checked now <shudder
There shouldn't be more than 5 checked (of course which 5 would be important). -- Regards, Tom Ogilvy " wrote in message ... OK, now it works. There were no "missing" entries. Only the first five options were checked however. Thank you for your help. "Norman Jones" wrote: Hi Jim, The References Option is greyed out and I am unable to select it. This would happen if you are in break mode - press the macro reset button and then try Bob's suggestion. --- Regards, Norman "Jim Mooney" <Jim wrote in message ... The References Option is greyed out and I am unable to select it. "Bob Phillips" wrote: Jim, Try going into ToolsReferences in the VBE, and see if there is a Missing reference in the list. If there is, uncheck it. You may need to browse for the correct version to ensure that things still work. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Mooney" wrote in message ... I don't know why Trim(...) function does not work in the Excel programming section of a worksheet for Excel 97. I also have a copy of Office 2003 and it works fine with this version. How do I convert this statement in Office 2003: Name = Trim(Name) to work in Office97? The error keeps coming up: Can't find project or library Trim is highlighted. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Can't find project or library" after emailing files. | Excel Discussion (Misc queries) | |||
Excell error "Can't find Project or Library" Project VBAProject | Excel Worksheet Functions | |||
indirect.ext - "can't find project or library" error | Excel Worksheet Functions | |||
adding reference "can't find project or library" | Excel Programming | |||
macro error "can't find project or library" | Excel Programming |