Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple .Net 2.0 class which I am trying to access from Excel
(Office XP). <InterfaceType(ComInterfaceType.InterfaceIsDual) _ Public Interface IComClass Property Value() As Object End Interface <ClassInterface(ClassInterfaceType.None) _ Public Class ComClass Implements IComClass Public Property Value() As Object Implements IComClass.Value Get Return Me._Value End Get Set(ByVal value As Object) Me._Value = value End Set End Property Private _Value As Object Public Sub New() Me._Value = 1234 End Sub End Class I have produced the .tlb, registered the class and added the apprioriate reference in VBA. However, when I try to run the following code I get an "object required" error at the line ' CC.Value = "abcd" ' Dim CC As New ComClass MsgBox (CC.Value) CC.Value = "abcd" MsgBox CC.Value Any idea what I am missing? Thanks Akash |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error | Excel Discussion (Misc queries) | |||
"Microsoft Visual Basic runtime error '424' object required". | Excel Worksheet Functions | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
error while compiling "OBJECT REQUIRED" | Excel Discussion (Misc queries) | |||
Getting "Object Required" Error Message - Need Help !!! | Excel Programming |