If Downloader1(0).ttt = True And Downloader1(1).ttt = True And Downloader1(2).ttt = True And Downloader1(3).ttt = True And Downloader1(4).ttt = True And Downloader1(5).ttt = True Then GoTo rr1 Else GoTo rr
请问如何节俭一些!
因为控件数组不一定是多些!
...全文
25114打赏收藏
这样的语句如何实现!
If Downloader1(0).ttt = True And Downloader1(1).ttt = True And Downloader1(2).ttt = True And Downloader1(3).ttt = True And Downloader1(4).ttt = True And Downloader1(5).ttt = True Then GoTo rr1 Else GoTo rr 请问如何节俭一些! 因为控件数组不一定是多些!
If Downloader1(0).ttt = True And Downloader1(1).ttt = True And Downloader1(2).ttt = True And Downloader1(3).ttt = True And Downloader1(4).ttt = True And Downloader1(5).ttt = True Then GoTo rr1 Else GoTo rr
等价于:
If Downloader1(0).ttt And Downloader1(1).ttt And Downloader1(2).ttt And Downloader1(3).ttt And Downloader1(4).ttt And Downloader1(5).ttt Then GoTo rr1 Else GoTo rr
Option Explicit
Dim flag As Boolean
Private Sub Command1_Click()
flag = False
Dim i As Long
For i = LBound(downloader1) To UBound(downloader1)
If downloader1(i).ttt = False Then
flag = True
GoTo rr1
End If