How to use old dll in Excel2002

D

Don

We have a dll that was written in the Excel97 days (or before) and made
use of in-cell CALL statements. Obviously, that doesn't work in
Excel02, and now I'm trying to find a way to make re-use it. I think
that my hangup is data types, but I could be wrong.

In excel97, one in-cell call to the dll looked like
=CALL("path/filename.dll", "dllfunction", "PP", E2)

I've tried using the following
Declare Function dllfuction Lib "path\filename.dll" (arg1 As String) As
Integer

Cells(3, 5) = dllfunction(arg)

This returns something, but not the right value. I speculate that I am
not properly replicating the return type of the "P" (OPER) data type.
Nothing that I have replaced the 'As Integer' with has worked properly.
The really important call to the dll uses the type string "PGGEGPPGP",
so its clear that I have to get it right.

I don't have access to the dll source code, or the original author.
That all came from another company that used to own this facility. So,
is there any hope of reusing this with modern excel, or do I just need
to find a copy of excel97 and keep it around for this?
 

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