I've try to store the Struct object to Collection, but i failed.
I defined a module contained a custom Struct as below
I have another Form as GUI and uses the custom Struct.
I got the error message as below.
only user-defined types difined in public object modules can be coerced to or from a variant or passed to late-bound functions
Please help me out!
I defined a module contained a custom Struct as below
Code:
Public Type Student ID As Integer Name As String End Type
Code:
Dim Std as Student Std.ID = 1 Std.Name = "John" Dim Coll as Collection Set Coll = New Collection Coll.Add Std, Std.ID
only user-defined types difined in public object modules can be coerced to or from a variant or passed to late-bound functions
Please help me out!
Code:
Public Type Student ID As Integer Name As String End Type
Comment