Option Explicit
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 20
Load Command1(i)
Next i
Unload Command1(2)
Unload Command1(4)
Unload Command1(20)
End Sub
Private Sub Command1_Click(Index As Integer)
Dim cmd1 As Object, x As String
For Each cmd1 In Command1
x = x & cmd1.Index & ","
Next
x = "," & x
Dim F As Boolean, i As Integer
For i = 0 To Command1.UBound + 1
F = InStr(x, "," & i & ",")
If Not F Then Debug.Print "数组控件中索引"; i & "元素不存在"
Next
End Sub
最后
以上就是喜悦画板最近收集整理的关于判断控件数组中的元素是否存在的全部内容,更多相关判断控件数组中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复