S
Slim Slender
Okay, let's try this.
How can I prevent this from 'going negative' like a campaigning
politician.
It should be able to decrement in case it is taken to high, but for my
present
purposes negative numbers are not acceptable.
Private Sub txtHours01_KeyDown(ByVal KeyCode _
As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim sHours As String
Dim v As Integer
Select Case KeyCode
Case 37 ' Left
v = -1
Case 39 ' Right
v = 1
Case Else
v = 0
End Select
sHours = txtHours01.Text
If IsNumeric(sHours) And v <> 0 Then
sHours = sHours + v * 0.25
txtHours01 = Format(sHours, "#0.00")
End If
End Sub
How can I prevent this from 'going negative' like a campaigning
politician.
It should be able to decrement in case it is taken to high, but for my
present
purposes negative numbers are not acceptable.
Private Sub txtHours01_KeyDown(ByVal KeyCode _
As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim sHours As String
Dim v As Integer
Select Case KeyCode
Case 37 ' Left
v = -1
Case 39 ' Right
v = 1
Case Else
v = 0
End Select
sHours = txtHours01.Text
If IsNumeric(sHours) And v <> 0 Then
sHours = sHours + v * 0.25
txtHours01 = Format(sHours, "#0.00")
End If
End Sub