Home All Groups Group Topic Archive Search About

Access current active workbook from DLL

Author
8 Sep 2006 2:42 AM
hon123456
Dear all,
            I will write a DLL by using Visual Basic. Then I will call
the DLL in Excel VBA. Some variables will be passed to the DLL from
VBA. After that, the DLL will get recordset from database will fill the
cells in current active workbook. My question is how can I access the
current active workbook from the DLL? As I know, there is Microsoft
Excel 8.0 Object Library for VB? If this library is used to access
the current active workbook,what is the code to access current active
workbook and sheet?

Thanks

Author
8 Sep 2006 4:53 AM
Arnie Rowland
This question is probably better addressed to an Excel or VBA newsgroup.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
"hon123456" <peterhon***@yahoo.com.hk> wrote in message
news:1157683345.084351.301710@e3g2000cwe.googlegroups.com...
> Dear all,
>            I will write a DLL by using Visual Basic. Then I will call
> the DLL in Excel VBA. Some variables will be passed to the DLL from
> VBA. After that, the DLL will get recordset from database will fill the
> cells in current active workbook. My question is how can I access the
> current active workbook from the DLL? As I know, there is Microsoft
> Excel 8.0 Object Library for VB? If this library is used to access
> the current active workbook,what is the code to access current active
> workbook and sheet?
>
> Thanks
>

AddThis Social Bookmark Button