Link workbook to DLL
Hi all,
I have previously posted a post about passing through a workbook name, and so link a VB6 DLL with a .xls workbook...
I'm stuck on the following: I want to make sure my DLL knows which workbook to work with, so I created this code in my DLL (I used project>references in both files):
Public Sub create(path_wkb)
Dim xlApp As Excel.Application
Dim xlWkbk As Workbook
Dim xlSheet As Worksheet
'
Set xlApp = New Excel.Application
Set xlWkbk = xlApp.Workbooks.Open(path_wkb)
'
set xlSheet = xlWkbk.Sheets("Sheet1")
xlsheet.range("A1").value = "test"
End Sub
However, I do not want to actually open the file, I just want to link xlWkbk to my workbook, but I did not find such a statement.
Any ideas would be much appreciated (Google wasn't able to help me today)
Max
|