Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Excel 97 gives error "Can't find project or library"

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.






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
"Can't find project or library" after emailing files. Sian Excel Discussion (Misc queries) 1 February 19th 08 10:31 PM
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
adding reference "can't find project or library" yule1111 Excel Programming 1 July 18th 04 03: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 11:35 AM.

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

About Us

"It's about Microsoft Excel"