用ParamArray接收任意个参数
|
51自学网 http://www.wanshiok.com |
Public Sub FillList(ListControl As ListBox, ParamArray Items()) Dim i As Variant With ListControl .Clear For Each i In Items .AddItem i Next End With End Sub
Private Sub Command1_Click() FillList List1, "TiffanyT", "MikeS", "RochesterNY" End Sub  
|
|