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) '''這邊會秀出error
''' 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
請問有什麼方法可以添加使用者自定型態到Arraylist
還是只能Name , Num , Bool 分別存放在不同的Arraylist作者: stillfish00 時間: 2013-12-19 09:15