Using an Activex DLL to apply formulas in Excel

  • Thread starter Thread starter YingYang
  • Start date Start date
Y

YingYang

Hello all,

As a simple example, say I have an Excel worksheet that has data, i
cells A1=7 and B1=14. For cell C1, I want it to be some formula lik
=a1*b1. Instead of putting the formula in that cell, could I use a
activex dll to apply the formula and put the result in cell C1?
Remember, I just want the result, not the forumla. I would like th
activex component to apply the formula. TIA
 
I'm not sure where the issue of an ActiveX DLL fits in here, but
the code would be something like the following:

Range("C1").Value = Range("A1").Value * Range("B1").Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks for the reply. So all I need to do is write the dll in VB an
compile it as an activex dll? On the Excel spreadsheet, I would creat
a push button to activate it. Could you provide some sample code o
how to activate the dll from the spreadsheet? Would it be a macro?
Also, the spreadsheet with data on it needs to be open right? Coul
you also provide some sample code or even point me to the righ
direction on how to write the activex dll on the VB side? Thank
again
 

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

Back
Top