不是在发现“ If”语句为真时退出子程序,而是要继续在数组中搜索“ If”语句为真的更多实例。
Rack = Array(1,2,3,4,5,6,7,8,9,10,11,12)
Spaces = Array(15,15,15,25,15, 25, 15, 15, 12, 12, 24,24)
For Each x In Rack
lim = Spaces(x-1)
y=0
Do Until y=lim
Point="Rack_"&x&"["&y&"].ON"
Point1="Rack_"&x&"["&y&"].WBS"
Point2="Rack_"&x&"["&y&"].SEC"
Point3="Rack_"&x&"["&y&"].LOC"
If @Point1 = WBSout Then
If @Point2 = SecNum Then
RackNum = x
SpaceNum = y +1
Loc = @Point3
Exit Sub
End If
End If
y=y+1
Loop
Next
我是否必须使用另一个数组来存储该信息?