paublojobino
New Member
- Joined
- May 27, 2022
- Messages
- 10
- Office Version
- 2010
- Platform
- Windows
Hi there,
Im wanting to set textbox "missionstart" to a value based on the value entered in textbox "flightstarthh"
I have tried this code below but whatever i do it always returns the value in the first if statement.
Where am i going wrong?
If flight1starthh.Value = "0" Or "1" Then
missionstart.Value = "0000 - 0159"
elseIf flight1starthh.Value = "2" Or "3" Then
missionstart.Value = "0200 - 0359"
ElseIf flight1starthh.Value = 4 Or 5 Then
'missionstart.Value = "0400 - 0559"
'ElseIf flight1starthh.Value = 6 Or 7 Then
'missionstart.Value = "0600 - 0759"
'ElseIf flight1starthh.Value = 8 Or 9 Then
'missionstart.Value = "0800 - 0959"
'ElseIf flight1starthh.Value = 10 Or 11 Then
'missionstart.Value = "1000 - 1159"
'ElseIf flight1starthh.Value = 12 Or 13 Then
'missionstart.Value = "1200 - 1359"
'ElseIf flight1starthh.Value = 14 Or 15 Then
'missionstart.Value = "1400 - 1559"
'ElseIf flight1starthh.Value = 16 Or 17 Then
'missionstart.Value = "1600 - 1759"
'ElseIf flight1starthh.Value = 18 Or 19 Then
'missionstart.Value = "1800 - 1959"
'ElseIf flight1starthh.Value = 20 Or 21 Then
'missionstart.Value = "2000 - 2159"
Else: missionstart.Value = "2200 - 2359"
end if
end sub
Im wanting to set textbox "missionstart" to a value based on the value entered in textbox "flightstarthh"
I have tried this code below but whatever i do it always returns the value in the first if statement.
Where am i going wrong?
If flight1starthh.Value = "0" Or "1" Then
missionstart.Value = "0000 - 0159"
elseIf flight1starthh.Value = "2" Or "3" Then
missionstart.Value = "0200 - 0359"
ElseIf flight1starthh.Value = 4 Or 5 Then
'missionstart.Value = "0400 - 0559"
'ElseIf flight1starthh.Value = 6 Or 7 Then
'missionstart.Value = "0600 - 0759"
'ElseIf flight1starthh.Value = 8 Or 9 Then
'missionstart.Value = "0800 - 0959"
'ElseIf flight1starthh.Value = 10 Or 11 Then
'missionstart.Value = "1000 - 1159"
'ElseIf flight1starthh.Value = 12 Or 13 Then
'missionstart.Value = "1200 - 1359"
'ElseIf flight1starthh.Value = 14 Or 15 Then
'missionstart.Value = "1400 - 1559"
'ElseIf flight1starthh.Value = 16 Or 17 Then
'missionstart.Value = "1600 - 1759"
'ElseIf flight1starthh.Value = 18 Or 19 Then
'missionstart.Value = "1800 - 1959"
'ElseIf flight1starthh.Value = 20 Or 21 Then
'missionstart.Value = "2000 - 2159"
Else: missionstart.Value = "2200 - 2359"
end if
end sub