如何判断数组控件text是否为空?
如何判断数组控件text是否为空?我有0-29三十个textbox1(),如何判断每一个是否为空?如果为空则设置textbox1(i).SetFocus
回复 2楼 mayuebo
谢谢版主,问题解决了!Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
Select Case Index
Case 0 To Me.Text1.UBound
If KeyCode = 13 Then
If Me.Text1(Index) = "" Then
Me.Text1(Index).SetFocus
Else
If Index + 1 > Me.Text1.UBound Then
Me.Text1(Me.Text1.UBound).SetFocus
Else
Me.Text1(Index + 1).SetFocus
End If
End If
End If
End Select
End Sub