If SecretWordLength = 5 Then
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
Label7.Visible = True
End If
这是当前的代码,用于根据密码的长度在我的刽子手游戏中显示字母下方。如何将其更改为FOR循环,以便我不必单独为每个标签重复此代码?
我正在考虑以这种方式使用FOR循环:
For i = 3 To 7
Labeli.Visible = True
Next
但它不起作用,因为它将i视为字母本身,而不是我想要它代表的数字。请帮忙?