M
MarkDev
I need to send a reference(?) to active workbook to external DLL. The
DLL is
written in VB6. In the external DLL I'll be updating this workbook.
Sample code is provided below:
Here is excel macro code:
Sub test3()
Dim TC As ClassA
Dim wbCodeBook As Workbook
Set TC = New ClassA
Set wbCodeBook = ThisWorkbook
TC.GetCellA1(wbCodeBook)
Set TC = Nothing
End Sub
Below is provided my VB6 code (this sub is part of CalssA):
Public Sub GetCellA1(locWB As Workbook)
Dim CellValue As String
CellValue = locWB.Worksheets(1).Range("A1")
MsgBox "Cell A1 = " + CellValue, "FROM DLL"
End Sub
It fails on the line TC.GetCellA1(wbCodeBook). The error message says:
"#438: Object doesn't support this property or method."
Please help
DLL is
written in VB6. In the external DLL I'll be updating this workbook.
Sample code is provided below:
Here is excel macro code:
Sub test3()
Dim TC As ClassA
Dim wbCodeBook As Workbook
Set TC = New ClassA
Set wbCodeBook = ThisWorkbook
TC.GetCellA1(wbCodeBook)
Set TC = Nothing
End Sub
Below is provided my VB6 code (this sub is part of CalssA):
Public Sub GetCellA1(locWB As Workbook)
Dim CellValue As String
CellValue = locWB.Worksheets(1).Range("A1")
MsgBox "Cell A1 = " + CellValue, "FROM DLL"
End Sub
It fails on the line TC.GetCellA1(wbCodeBook). The error message says:
"#438: Object doesn't support this property or method."
Please help