Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default TRIM Function gives Compiler Error!!!!

Hi,

I am facing a curious problem where, seemingly, Trim() function gives
Compile Error: Object/Library not found. Following is a synopsis:


Code and defenitions:
a. Defined a form with name "ReportForm". It has two Multipages
"Main" and "BIN Values".

b. Upon clicking a CommandButton in the form, the code (for the
buttonclick) copies the form variables into program variables and
calls a procedure DoNewTicketFile() [that takes no parameters]

c. I have defined the code for this procedure in a separate module
called "CodeModule1".


What happens at run time:
The execution stops with a "Compile error: Object or Library not
found", yellow-highlighting the procedure defenition statement [ie.
Sub DoNewTicketFile{} ]. And down in the code, about a couple of
Set worksheet statements later, there is an IF statement that checks
the Trim value of a cell. This Trim is higlighted in blue. Am I
right in thinking that VBA cannot find this Trim function in the
library?? (incredulous as it seems)?


Other behavior:
1. A simple test for Trim (such as ?Trim(" abcd ") in the Immediate
window also gives error!

2. On loading some other application (a previous version of this
application, without the userform), the Immediate window is able to
execute the Trim statement.

3. Strangest thing: I developed the code for my friend. It runs ok
on my PC. But it is giving error on my friends PC. He says that
there has been no installation changes in Excel.

4. The above problem description are taken from behavior observed on
my friends PC.



The question(s):
A. Has anybody ever faced this kind of problem? What did you have to
do to eliminate it?

B. I am stumped as where to look and what to do. I can only think of
brute force things which are not gauranteed to work - such as giving
all the code in the code module for the form (instead of a new
module). Even as i say it, that sounds so dense...

C. Any ideas / pointers / hints as what to do, how to nail the exact
problem (which library is missing or has duplicate names bad enough
for VBA to confuse such a basic thing as Trim() function), websites
etc, will be very very very helpful.


Extra Info:
a) Both "Analysis ToolPak" and "Analysis ToolPak-VBA" Add-ons are
switched on in both the PCs.
b) The Excel version is 2002. (Office XP 2002, running on Windows XP)


Advance thanks for any & all inputs.

Best Regards,
-feltra )

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default TRIM Function gives Compiler Error!!!!

With that project active, click on Tools|References.

Look for a reference marked MISSING. You'll have to decide if you need to
replace it or just uncheck it.

The line marked in error may not (will probably not!) have anything to do with
the missing reference.

feltra wrote:

Hi,

I am facing a curious problem where, seemingly, Trim() function gives
Compile Error: Object/Library not found. Following is a synopsis:

Code and defenitions:
a. Defined a form with name "ReportForm". It has two Multipages
"Main" and "BIN Values".

b. Upon clicking a CommandButton in the form, the code (for the
buttonclick) copies the form variables into program variables and
calls a procedure DoNewTicketFile() [that takes no parameters]

c. I have defined the code for this procedure in a separate module
called "CodeModule1".

What happens at run time:
The execution stops with a "Compile error: Object or Library not
found", yellow-highlighting the procedure defenition statement [ie.
Sub DoNewTicketFile{} ]. And down in the code, about a couple of
Set worksheet statements later, there is an IF statement that checks
the Trim value of a cell. This Trim is higlighted in blue. Am I
right in thinking that VBA cannot find this Trim function in the
library?? (incredulous as it seems)?

Other behavior:
1. A simple test for Trim (such as ?Trim(" abcd ") in the Immediate
window also gives error!

2. On loading some other application (a previous version of this
application, without the userform), the Immediate window is able to
execute the Trim statement.

3. Strangest thing: I developed the code for my friend. It runs ok
on my PC. But it is giving error on my friends PC. He says that
there has been no installation changes in Excel.

4. The above problem description are taken from behavior observed on
my friends PC.

The question(s):
A. Has anybody ever faced this kind of problem? What did you have to
do to eliminate it?

B. I am stumped as where to look and what to do. I can only think of
brute force things which are not gauranteed to work - such as giving
all the code in the code module for the form (instead of a new
module). Even as i say it, that sounds so dense...

C. Any ideas / pointers / hints as what to do, how to nail the exact
problem (which library is missing or has duplicate names bad enough
for VBA to confuse such a basic thing as Trim() function), websites
etc, will be very very very helpful.

Extra Info:
a) Both "Analysis ToolPak" and "Analysis ToolPak-VBA" Add-ons are
switched on in both the PCs.
b) The Excel version is 2002. (Office XP 2002, running on Windows XP)

Advance thanks for any & all inputs.

Best Regards,
-feltra )


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default TRIM Function gives Compiler Error!!!!

Hi Dave,

it seems, string-functions
are the canaries in the coal mines.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default TRIM Function gives Compiler Error!!!!

Hi Dave,

Thanks for the fast response. I am relieved to see that you also
think this is a spurious error... Will ask my friend to try that out
on his PC.

Will update as soon as i hear from my friend.

Thanks a lot & Warm Regards,
-feltra


On Jan 9, 8:50 pm, Dave Peterson wrote:
With that project active, click on Tools|References.

Look for a reference marked MISSING. You'll have to decide if you need to
replace it or just uncheck it.

The line marked in error may not (will probably not!) have anything to do with
the missing reference.



feltra wrote:

Hi,


I am facing a curious problem where, seemingly, Trim() function gives
Compile Error: Object/Library not found. Following is a synopsis:


Code and defenitions:
a. Defined a form with name "ReportForm". It has two Multipages
"Main" and "BIN Values".


b. Upon clicking a CommandButton in the form, the code (for the
buttonclick) copies the form variables into program variables and
calls a procedure DoNewTicketFile() [that takes no parameters]


c. I have defined the code for this procedure in a separate module
called "CodeModule1".


What happens at run time:
The execution stops with a "Compile error: Object or Library not
found", yellow-highlighting the procedure defenition statement [ie.
Sub DoNewTicketFile{} ]. And down in the code, about a couple of
Set worksheet statements later, there is an IF statement that checks
the Trim value of a cell. This Trim is higlighted in blue. Am I
right in thinking that VBA cannot find this Trim function in the
library?? (incredulous as it seems)?


Other behavior:
1. A simple test for Trim (such as ?Trim(" abcd ") in the Immediate
window also gives error!


2. On loading some other application (a previous version of this
application, without the userform), the Immediate window is able to
execute the Trim statement.


3. Strangest thing: I developed the code for my friend. It runs ok
on my PC. But it is giving error on my friends PC. He says that
there has been no installation changes in Excel.


4. The above problem description are taken from behavior observed on
my friends PC.


The question(s):
A. Has anybody ever faced this kind of problem? What did you have to
do to eliminate it?


B. I am stumped as where to look and what to do. I can only think of
brute force things which are not gauranteed to work - such as giving
all the code in the code module for the form (instead of a new
module). Even as i say it, that sounds so dense...


C. Any ideas / pointers / hints as what to do, how to nail the exact
problem (which library is missing or has duplicate names bad enough
for VBA to confuse such a basic thing as Trim() function), websites
etc, will be very very very helpful.


Extra Info:
a) Both "Analysis ToolPak" and "Analysis ToolPak-VBA" Add-ons are
switched on in both the PCs.
b) The Excel version is 2002. (Office XP 2002, running on Windows XP)


Advance thanks for any & all inputs.


Best Regards,
-feltra )


--

Dave Peterson


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default TRIM Function gives Compiler Error!!!!

Yeah.

I wonder why that is. More commonly used, maybe????

Helmut Weber wrote:

Hi Dave,

it seems, string-functions
are the canaries in the coal mines.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default TRIM Function gives Compiler Error!!!!

- also DateTime functions

Regards,
Peter T

"Helmut Weber" wrote in message
...
Hi Dave,

it seems, string-functions
are the canaries in the coal mines.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default TRIM Function gives Compiler Error!!!!

Hi Dave,

You are a gem! Yes, that was the problem. Two entries were listed
as MISSING and were checked on. In hindsight, these 2 were ActiveX
Controls and something called Control Shapes that I had clicked on
while playing around in forms. Although I would like to hide behind
"I am new to forms" I ought to have known better than to send an XLS
file to my friend with ActiveX Controls turned on.... Poor practice
on my part.

Once again, thank you so much for the timely help. He had a deadline
to meet and now thats ok.

Best Regards,
-feltra


On Jan 9, 8:50 pm, Dave Peterson wrote:
With that project active, click on Tools|References.

Look for a reference marked MISSING. You'll have to decide if you need to
replace it or just uncheck it.

The line marked in error may not (will probably not!) have anything to do with
the missing reference.



feltra wrote:

Hi,


I am facing a curious problem where, seemingly, Trim() function gives
Compile Error: Object/Library not found. Following is a synopsis:


Code and defenitions:
a. Defined a form with name "ReportForm". It has two Multipages
"Main" and "BIN Values".


b. Upon clicking a CommandButton in the form, the code (for the
buttonclick) copies the form variables into program variables and
calls a procedure DoNewTicketFile() [that takes no parameters]


c. I have defined the code for this procedure in a separate module
called "CodeModule1".


What happens at run time:
The execution stops with a "Compile error: Object or Library not
found", yellow-highlighting the procedure defenition statement [ie.
Sub DoNewTicketFile{} ]. And down in the code, about a couple of
Set worksheet statements later, there is an IF statement that checks
the Trim value of a cell. This Trim is higlighted in blue. Am I
right in thinking that VBA cannot find this Trim function in the
library?? (incredulous as it seems)?


Other behavior:
1. A simple test for Trim (such as ?Trim(" abcd ") in the Immediate
window also gives error!


2. On loading some other application (a previous version of this
application, without the userform), the Immediate window is able to
execute the Trim statement.


3. Strangest thing: I developed the code for my friend. It runs ok
on my PC. But it is giving error on my friends PC. He says that
there has been no installation changes in Excel.


4. The above problem description are taken from behavior observed on
my friends PC.


The question(s):
A. Has anybody ever faced this kind of problem? What did you have to
do to eliminate it?


B. I am stumped as where to look and what to do. I can only think of
brute force things which are not gauranteed to work - such as giving
all the code in the code module for the form (instead of a new
module). Even as i say it, that sounds so dense...


C. Any ideas / pointers / hints as what to do, how to nail the exact
problem (which library is missing or has duplicate names bad enough
for VBA to confuse such a basic thing as Trim() function), websites
etc, will be very very very helpful.


Extra Info:
a) Both "Analysis ToolPak" and "Analysis ToolPak-VBA" Add-ons are
switched on in both the PCs.
b) The Excel version is 2002. (Office XP 2002, running on Windows XP)


Advance thanks for any & all inputs.


Best Regards,
-feltra )


--

Dave Peterson


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
Compiler Error - Not an Appropriate Name pallaver Excel Discussion (Misc queries) 1 July 16th 08 02:20 AM
Compiler Error Bobzter100 Excel Discussion (Misc queries) 4 November 10th 07 11:02 AM
Help with compiler error Pank Mehta Excel Programming 1 March 11th 05 12:03 PM
Compiler Error Chris Excel Programming 2 December 9th 04 05:02 PM
Trim Function - Error Library Not Found Doug[_11_] Excel Programming 5 June 30th 04 04:43 AM


All times are GMT +1. The time now is 09:36 PM.

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"