VBA References

K

Kirk

Here is my current situation. I am updating a spreasheet
that has a lot of VBA code behind the scenes using
XL2002 - XP. At the same time I am updating it in XP I
am also verifying that the same spreadsheet works
properly in XL97. Currently I am having a problem with a
object reference in XL97. It does not recognize the
Replace function like it does in XL2002. I have the
correct DLL to link the reference, but the DLL I keep
trying to add says "Name conflicts with existing module,
project, or object library". I tried to remove the
existing reference but it continuous says "Can't remove
control or refernce; in use"

What can I do? I need to utilize the Replace function,
but at the same time I need it to be backwards
compatibile. Any ideas?

Any and all help would be appreciated.

Thanks.

Kirk
 
H

Howard Kaikow

There is no Replace function in VBA in Office 97.

Two ways around the problem:

1. If you have VB 6, you can create an Active DLL that uses the Replace
function in VB 6 and call the code from VBA when running in Excel 97, and
even Excel 2000 and 20002.
2. You can write your own Replace function.
 
D

Dave Peterson

In xl97, you can use application.substitute() to replace Replace.

(I liked typing that sentence!)
 

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