请教vb中的array函数
PrivateSubForm_Load()Dima,i%a=Array(1,2,3,4,5)'Fori=LBound(a)ToUBound(a)Printa(i)Next...
Private Sub Form_Load()
Dim a, i%
a = Array(1, 2, 3, 4, 5) '
For i = LBound(a) To UBound(a)
Print a(i)
Next i
End Sub 展开
Dim a, i%
a = Array(1, 2, 3, 4, 5) '
For i = LBound(a) To UBound(a)
Print a(i)
Next i
End Sub 展开
展开全部
详细的实例代码如下:
Private Sub Command1_Click()
Combo1.AddItem "一月"
Combo1.AddItem "二月"
Combo1.AddItem "三月"
Combo1.AddItem "四月"
Combo1.AddItem "五月"
Combo1.AddItem "十二月"
End Sub
Private Sub Command2_Click()
a = Array("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月")
For i = 0 To UBound(a)
Combo1.AddItem a(i)
Next
Combo1.ListIndex = 0
End Sub
Private Sub Command1_Click()
Combo1.AddItem "一月"
Combo1.AddItem "二月"
Combo1.AddItem "三月"
Combo1.AddItem "四月"
Combo1.AddItem "五月"
Combo1.AddItem "十二月"
End Sub
Private Sub Command2_Click()
a = Array("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月")
For i = 0 To UBound(a)
Combo1.AddItem a(i)
Next
Combo1.ListIndex = 0
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
A 是个数组。a(0)=1;a(1)=2;^……
从a(0)到a(5),依次输出。
从a(0)到a(5),依次输出。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
问啥呢?
a是个数组啊
a是个数组啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
就是用元素建立一个数组。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询