N
Nick Dreyer
Is it possible to see public class variables of a COM addin in Excel 97 VBA?
I have successfully created the (Visual Basic 2003 .NET) COM
and referenced it in an Excel 97 VBA project. The VBA object browser sees -
and the project otherwise successfully interacts with - all the COM addin
methods and properties, but none of the public variables - target, init and
size in the code below - can be accessed. When I reference the exact same COM
from another dotnet project, the COM class public variables are all available.
What is going on here?
I notice that I have to choose the COM addin's .tlb file, not the .dll file in
the VBA reference dialog box. Is that expected?
Can Excel 97 VBA just not access COM class variables - or "fields" as the
dotnet documentation calls them? If so, that is going to be a serious
limitation for me.
The vb.net code of the COM addin I am using is like this:
<ComClass(fpm_goalseek_class.ClassId, _
fpm_goalseek_class.EventsId, _
fpm_goalseek_class.InterfaceId)> _
Public Class fpm_goalseek_class
Public Const ClassId As String = "6C1967B7-4EC8-4b70-BA94-C131EE892452"
Public Const InterfaceId As String = "4CDC9471-D4E2-4824-BD4D-938EF299D58C"
Public Const EventsId As String = "4D18D7F1-BC51-49f0-824B-69F607EBD3B2"
Public target as double
Public init as double
Public size as double
' . . . Body of class code here . . .
End Class
|\|.
I have successfully created the (Visual Basic 2003 .NET) COM
and referenced it in an Excel 97 VBA project. The VBA object browser sees -
and the project otherwise successfully interacts with - all the COM addin
methods and properties, but none of the public variables - target, init and
size in the code below - can be accessed. When I reference the exact same COM
from another dotnet project, the COM class public variables are all available.
What is going on here?
I notice that I have to choose the COM addin's .tlb file, not the .dll file in
the VBA reference dialog box. Is that expected?
Can Excel 97 VBA just not access COM class variables - or "fields" as the
dotnet documentation calls them? If so, that is going to be a serious
limitation for me.
The vb.net code of the COM addin I am using is like this:
<ComClass(fpm_goalseek_class.ClassId, _
fpm_goalseek_class.EventsId, _
fpm_goalseek_class.InterfaceId)> _
Public Class fpm_goalseek_class
Public Const ClassId As String = "6C1967B7-4EC8-4b70-BA94-C131EE892452"
Public Const InterfaceId As String = "4CDC9471-D4E2-4824-BD4D-938EF299D58C"
Public Const EventsId As String = "4D18D7F1-BC51-49f0-824B-69F607EBD3B2"
Public target as double
Public init as double
Public size as double
' . . . Body of class code here . . .
End Class
|\|.