471,350 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Bind to Excel

In VB6 I have an app that interacts with Excel via some VBA routines written
in an Excel Workbook (XLA). When the XLA loads it calls the VB6 DLL and
passes a reference to the instance of Excel that it is running in. The VB6
DLL stores this info using the following code

Private gExcel as Object
Public Property Set Excel(XL As Object)
Set gExcel = XL
End Property

An associated Property Get then allows me to access the Excel object from
other DLLs in my app

Public Property Get Excel() As Object
Set Excel = gExcel
End Property

From another linked DLL I can then use code such as

LogFileName = Excel.ThisWorkbook.Path

If I try similar code to this in Csharp I get an error saying that "'object'
does not contain a definition for 'ThisWorkbook'". How can I overcome this?

Thanks

Alan
Dec 20 '05 #1
0 864

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Clarence Gardner | last post: by
1 post views Thread by Achille Carette | last post: by
reply views Thread by gianni | last post: by
2 posts views Thread by P G | last post: by
4 posts views Thread by Arturo Cuebas | last post: by
reply views Thread by teclioness | last post: by
1 post views Thread by Tigera | last post: by
6 posts views Thread by crack.the.hack | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.