Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to add user-defined data types to a collection
Hi,
I am adding a user-defined data type to a collection as illustrated below but failed ... Can somone please help? Thanks.. 'All codes here are written in a module "ErrSeeder" '-------------------------------------- (General) (Declarations) Type Seed name as string no as integer End Type '-------------------------------------- Sub test() Dim c As New Collection Dim s As Seed s.Name = "Watermelon Seed" s.no = 1 c..Add s <- Compliation fail at this point with the following error : Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions End Sub '-------------------------------------- May I know where can I define my user data type so that the code above will work ? What does it mean by public object modules ? Thanks. Regards, Adrian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Standard chart types over-ridden by user-defined 'default' | Charts and Charting in Excel | |||
Save user-defined chart types in a shared Excel template? | Charts and Charting in Excel | |||
How do I share User-Defined Custom Chart Types in Pivot Charts? | Charts and Charting in Excel | |||
User defined data type | Excel Programming | |||
Macros and User Defined Data Strucures | Excel Programming |