Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to make a collection in which i place variables of a type that i defined. I keep getting an error message. What is the problem? The error message: "Compile error: Only user-defined types defined in public object modules can be coerced to or from a cariant or passed to late-bound functions" The code (and where the error is thrown): Public Type myType stuff As Integer End Type Sub main() Dim box As Collection Set box = New Collection Dim myVar As myType myVar.stuff = 1 box.Add myVar '<-THIS IS WHERE I GET THE ERROR End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User-defined type collection in class module | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming |