Passing Strucutres from VBA to DLL and back

G

Guest

Hi,

I need to pass a matrix type data structure between Excel VBA and an
external DLL (XLL actually).

Because of the bug in Excel, where a call to
Application.Evaluate("MyXLLFunction()") will actually call my proc twice, I
want to be able to declare the external method in VBA and call it, without
using Evaluate.

This is easy enough with simple types, but I want to be able to return a
more complex data type back and forth, one similar to the Excel SDK's Multi
type, where you can return multiple rows of multiple columns.

Does anyone know the best way of doing this?

Thanks

Mike Davies
 
P

Peter T

Hi Mike,

I can't answer your question but as it's been around a while perhaps clarify
the following for others to consider -

What's the Excel bug that results in your proc being called twice. Is this a
"known issue" or due different parts of some formula requiring the same
function.

Could you illustrate your complex data type. Though from what you describe
it sounds like a normal Range object.

Regards,
Peter T
 

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