View Single Post
  #7   Report Post  
newOLE
 
Posts: n/a
Default

Thanks

so, what's the syntax to run a VBA macro that has arguments

e.g. answer = dothis(a, b, c, d)

Also, does any non-visible function (when I do Alt-F11) loaded through an
add-in become a VBA macro?


"Harlan Grove" wrote:

newOLE wrote...
....
New question: how do i execute a function written with arguments passed and
lay out its return parameters on a range of cells. This function is an Excel
add-in. Does that require special processing?

....

At this point I have to question why you're screwing around with Perl
to do this. You may be better off using Perl to do no more than start
Excel and load the necessary workbooks. Then run a VBA macro in one of
the workbooks to do what you need to do.

However, if the add-in you need to use is automatically loaded by Excel
(via settings made in Excel using Tools Add Ins), you may need to use
the Evaluate method of the Application class rather than the Run
method. You'd need to make the argument to Evaluate look like a cell
formula.