excel 2003 vba.. writing arraylist -


i trying create arraylist of class in java, in visual basic excel 2003.

java

list<employee> employees = new arraylist<employee>(); employee employee = new employee(); employee.setname("tom"); employees.add(employee); 

vb

dim resultlist new collection     dim manager employee manager.name = "df"     resultlist.add ("rr") 'correct resultlist.add (manager) 'error 

but gives following error:

only user-define types defined in public object modules can coerced or variant or passed late-bound functions

there no type information associated udt can't added collection there no way reliably convert to/from variant number & types of members unknown.

you can either replace employee type class or don't appear using key, typed array: arr() employee


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -