0

I have a dll exposed via COM to VBA macros in my Excel workbook. In the dll, the primary function takes as input a bunch of data from various cells in the worksheet, and produces a table of outputs to be displayed elsewhere on the same excel worksheet. I am trying to figure out how to have this function called any time one of the input cells change, populating all the output cells at the same time.

It has come to my attention that a VBA UDF cannot write to the speadsheet calling it (no side-effects)... it can only read from the spreadsheet and return values through the functions primary return value.

Is there a good way to map a large input set to a large output set without having to call the dll separately for each entry in the table?

1 Answer 1

1

Yes. If the function returns an array, you can select all the future result cells, enter the formula once,

=TheFunction(a1,b2,c3)

and press Ctrl+Shift+Enter.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.