Hi All,
I'm having a little wierdness with using the >= and <= comparison operators.
Can anyone tell me why these conditions
[VBA]
If StartTime.Value >= Range.StartTime And StartTime.Value <= Range.EndTime Then
MsgBox "Part Of This Range Has Already Been Selected. Please Select New Range", vbCritical
Unload Me
AddDataRangeForm.Show
Exit Sub
End If
[/VBA]
would not trigger the if statements but these conditions
[vba]
If StartTime.Value - Range.StartTime >= 0 And StartTime.Value - Range.EndTime <= 0 Then
MsgBox "Part Of This Range Has Already Been Selected. Please Select New Range", vbCritical
Unload Me
AddDataRangeForm.Show
Exit Sub
End If
[/vba]
work just fine with the same values for StartTime.Value, Range.StartTime and Range.EndTime (eg StartTime.Value = 5, Range.StartTime = 1, Range.EndTime = 10) in both instances?
Thanks Guys!