Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2003, 10:03 AM
Authorized User
 
Join Date: Sep 2003
Posts: 25
Thanks: 0
Thanked 1 Time in 1 Post
Default Can an ActiveX DLL reference a spreadsheet?

Hi,

I am writing an ActiveX DLL with VB6, which is referenced by my Excel spreadsheet. i.e. my DLL has functions which I call from the VBA in the spreadsheet.

I am passing cell data from the spreadsheet as parameters when I call the DLL functions from the VBA. The DLL then manipulates that data and sends back the results to the spreadsheet VBA. The VBA then plugs the results into the appropriate cells.

This is the first time I have done this, and have a related question.

Instead of passing the cell data to the DLL functions, is there a way that a DLL function can "look at" the spreadsheet and get the cell data for itself? This would involve (I guess) the DLL function being able to reference the spreadsheet (workbook) in some way.

Is this possible? If so, how do I do it? Or is it a stupid question?

Hope you can help - all info is useful as I am new to this.

Many thanks.

James







Similar Threads
Thread Thread Starter Forum Replies Last Post
Advantages /Disadvantages of ActiveX DLL & ActiveX priyank Beginning VB 6 6 February 19th, 2007 11:34 AM
ActiveX DLL Joann Beginning VB 6 6 January 25th, 2007 08:50 PM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM
Referencing a spreadsheet from an ActiveX DLL James Diamond Excel VBA 2 January 23rd, 2004 07:21 AM
Can a VB6 ActiveX DLL reference a spreadsheet? james gold Pro VB 6 0 October 2nd, 2003 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.