Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
How to pass active workbook to external DLL?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="NickHK, post: 9032760"] Mark, This works for me: '------------------------ 'DLL <ExcelTest> Class <cTest> 'Reference to Excel library Public Function GetCellA1Value(argWB As Excel.Workbook) As Variant GetCellA1Value = argWB.Worksheets(1).Range("A1").Value End Function '------------------------ 'In Excel 'Reference to ExcelTest.dll Dim DLLTest As ExcelTest.cTest Private Sub CommandButton1_Click() Set DLLTest = New ExcelTest.cTest With DLLTest MsgBox "The value in cell A1 of WS(1) is " & ..GetCellA1Value(ThisWorkbook) End With End Sub '------------------------ NickHK [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
How to pass active workbook to external DLL?
Top