概述
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
最后
以上就是喜悦画板为你收集整理的判断控件数组中的元素是否存在的全部内容,希望文章能够帮你解决判断控件数组中的元素是否存在所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复