repeat Array -> simple code

myspeed

New Member
Hi guys~~! :)

Plz I need a simple code.

How can I fix?


If stat1(1)="x" Then
st1.Visible=false
End If

If stat2(1)="x" Then
st2.Visible=false
End If

If stat3(1)="x" Then
st3.Visible=false
End If

If stat4(1)="x" Then
st4.Visible=false

End if

If stat5(1)="x" Then
st5.Visible=false

End if



-----

For K=1 to 5
if stat(K)(1)="x" then ---->> :sign0085:
control("st"&K).visible=false
end if
Next





st1.Text=stat1(9)
st2.Text=stat2(9)
st3.Text=stat3(9)
st4.Text=stat4(9)
st5.Text=stat5(9)



----

for K=1 to 5
Control("st"&i).text=stat(K)(9) ------>> stat(K)(9) :sign0085:
next



Thanks for reading! :)
 
Last edited:

Pavel

Member
Думаю так будет вернее:

Sub Globals
Dim stat(5,SomeValue)
End Sub
For K=1 to ArrayLen (stat())
if stat(K-1,1)="x" then
control("st"&K).visible=false
end if
Next
 
Top