Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
i = 49
For j = 8 To 13
If KeyCode = i Then
工作表1.OLEObjects("TextBox" & j).Activate
i = i + 1
Next
End If
End Sub
以上該如何撰寫才能寫出迴圈?(如下)
If KeyCode = 49 Then
TextBox8.Activate
End If
If KeyCode = 50 Then
TextBox9.Activate
End If
If KeyCode = 51 Then
TextBox10.Activate
End If
以此類推~作者: oobird 時間: 2011-9-11 12:59
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)