How to allow users to increase and decrease the value using Up and Down arrow keys in a text box
Posted on July 19, 2011
1 2 3 4 5 6 7 8 9 | 'Controls - How to allow users to increase and decrease the value using Up and Down arrow keys in a text box Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case vbKeyUp Text1.Text = CDbl(Text1.Text) + 1 Case vbKeyDown Text1.Text = CDbl(Text1.Text) - 1 End Select End Sub |