Can't find String functions.... Missing library

E

Ed

I have written a VBA Excel Add-in that works fine on my development
machine running XP pro,
using Excel 2002 installed as part of Office 10. I have another
machine running XP Home edition
with the same Office 10 and Excel running. On that machine some
functions won't run because
it can't find the libraries with the built-in string functions, e.g.,
Mid(), Trim(), UCase(). I did
a reinstall/repair on Office, but no help.

Any thoughts?

TIA

Ed
 
R

Rick Rothstein \(MVP - VB\)

In the VBA editor, click on Tools/References and see if anything is marked
as "Missing". If so, check the item or items and then try your code again.

Rick
 
T

Tom Ogilvy

on the problematic machine, after the error, go into tools=>References in the
VBE and you should see one or more references marked as MISSING.

Fix these references as they are the source of your problem (high
probability they have nothing to do with the string library).

Or look in your own machine and see what references you have in this
workbook that are not likely to be in your users environment.
 
H

Harlan Grove

In the VBA editor, click on Tools/References and see if anything
is marked as "Missing". If so, check the item or items and then
try your code again. ....

Mid, Trim and UCase are built into VBA itself. OP would have had to
have removed references to VBA itself, but that'd mean more than just
the string functions would have failed.
 
R

Rick Rothstein \(MVP - VB\)

In the VBA editor, click on Tools/References and see if anything
Mid, Trim and UCase are built into VBA itself. OP would have had to
have removed references to VBA itself, but that'd mean more than just
the string functions would have failed.

Well, the OP did say "e.g. (for example)"<g>, so he may only be reporting
String function because they are what he saw first. As for the OP removing
the reference... I don't think he can... however, for reasons I have never
been able to find out (over in the compiled VB side of thing, at least), the
system can decide, on its own, to remove one or more references. When it
does, the kind of problems the OP is reporting usually is the result. The
only other way I've seen these commands cease working is when a variable in
the same scope as the attempted function call is named the same as the
built-in function (for example, naming a module level variable mID... short
for module ID). However, this seems unlikely here because of the number of
functions involved.

Rick
 
T

Tom Ogilvy

In excel VBA, this is a consistent indicator of exaclty what you said - a
Missing reference not related to VBA. Why it always seems to flag a VBA
built in function I can't say - perhaps it is the first time it consults the
references - but invarialble the answer that corrects this problem is to fix
the MISSING reference.
 
A

Alan Beban

Harlan said:
...

Mid, Trim and UCase are built into VBA itself. OP would have had to
have removed references to VBA itself, but that'd mean more than just
the string functions would have failed.

As Dave Peterson said in the thread "Select Case Syntax" on July 15th,

"And the part that makes it really confusing is that if you're missing a
reference, then the line that is marked with an error may not have
anything to do with anything in that reference."

In that thread the failing commands were Mid, Right and Len, and the
missing Library was ArrayAdd-Ins.xls. Go figure.

Alan Beban
 
E

Ed

You're right. It says that Microsoft MSM Merge Type library is
missing. Wonder why?
As I said, I did a repair of the installation off the Office 10 CD.
Also, the test machine
is my wife's, in a room across the hall. I'm a bit worried that it
might fail on another machine
a bit more difficult for me to get at and fix.

Thanks to Tom and others who identified the problem.

Ed
 
E

Ed

I now see that I am runing Excel 2002 SP3 on my development machine
and no SPs at all
on the other machine. Gotta figure out how to get teh SP now....

Ed
 
E

Ed

The missing file is apparently mergemod.dll in C:\Program Files\Common
Files\Microsoft Shared\MSI Tools on my development machine, which
seems to be running Excel 2002 SP3. There is no such file or directory
on the 2nd machine
which is running without any SPs.

Ed
 
T

Tom Ogilvy

this is from MSDN

Merge Modules
Merge modules provide a standard method by which developers deliver shared
Windows Installer components and setup logic to their applications. Merge
modules are used to deliver shared code, files, resources, registry entries,
and setup logic to applications as a single compound file. Developers
authoring new merge modules or using existing merge modules should follow the
standard outlined in this section. . . .

My guess would be that you don't need this and it has nothing to do with
Office - I don't know your application, so I can't say for certain, but your
comments certainly imply that it doesn't I would suggest unchecking it on
your machine and saving your file.

I know for certain it isn't a standard library need to run office. It
isn't on any version of Excel I use.
 
E

Ed

Tom,

I put that in at some point thinking it was necessary because I was
launching Word and
Mail Merge from Excel in a couple of my functions. From what you quote
it seems
it has nothing to do with ail Merge. I have unchecked it on my
development machine and tested
the functions that use MM. Seems to work OK. Tomorrow I'll test it on
the other machine.

Thanks.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top