以下是引用purana在2006-12-28 13:37:13的发言: Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyRight Or KeyCode = vbKeyDown Then If Index = Text1.Count - 1 Then Index = -1 Text1(Index + 1).SetFocus ElseIf KeyCode = vbKeyLeft Or KeyCode = vbKeyUp Then If Index = 0 Then Index = Text1.Count Text1(Index - 1).SetFocus End If End Sub