Rufus Clupea
Board Regular
- Joined
- Feb 11, 2019
- Messages
- 85
I've looked up what the title of this post means, but (pardon the pun) that's not the Case. I must have done something else wrong, either syntactically or logically, but I can't see it.
The following Sub works fine until I try to insert the commented lines.
Thanks.
The following Sub works fine until I try to insert the commented lines.
Code:
Private Sub TextBox1_Change()
Dim i As Integer
If Len(TextBox1.Value) = 1 Then Exit Sub
If Val(TextBox1.Value) < SpinButton1.Min Then
TextBox1.Value = SpinButton1.Min
End If
If Val(TextBox1.Value) > SpinButton1.Max Then
TextBox1.Value = SpinButton1.Max
End If
SpinButton1.Value = TextBox1.Value
Number1 = Val(TextBox1.Value)
Select Case Number1
Case Is < 18
Number1_Label1.Caption = "Minor"
Case Is > 65
Number1_Label1.Caption = "Senior"
[COLOR=#006400]' For i = 1 To (Number1 - 65)
' If ConditionA > Number1 Then Number1 = Number1 + 1:
' If ConditionB > Number1 Then Number1 = Number1 + 2:
' If ConditionC > Number1 Then Number1 = Number1 + 3:
' If ConditionD > Number1 Then Number1 = Number1 + 4
' Next i
'
' If ConditionA < 1 Or ConditionB < 1 Or ConditionC < 1 Or ConditionD < Then
' MsgBox "Text"[/COLOR]
Case Else
Number1_Label1.Caption = "Adult"
End Select
End Sub
Thanks.