- ©«¤l
- 4
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 55
- ÂI¦W
- 0
- §@·~¨t²Î
- window7
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2011-8-12
- ³Ì«áµn¿ý
- 2016-12-13
|
[µo°Ý] ½Ð°Ý VBA ¦p¦ó add Object ¨ì ArrayList "ArrayList.Add(Object)"
Type Test
Name As String
Num As Integer
Bool As Boolean
End Type
Public ArrList As New ArrayList
Sub AddArrayList()
Dim Test1 as Test
Test1 .Name ="sophia"
Test1.Num=3
Test1.Bool=True
ArrList .Add(Test1) '''³oÃä·|¨q¥Xerror
''' SHOW:
'''Compile erroe: only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions.
EndSub
½Ð°Ý¦³¤°»ò¤èªk¥i¥H²K¥[¨Ï¥ÎªÌ¦Û©w«¬ºA¨ìArraylist
ÁÙ¬O¥u¯àName , Num , Bool ¤À§O¦s©ñ¦b¤£¦PªºArraylist |
|