Hi all, I'm trying to omit past timings of combo box 2 from combo box 1 and display it. My codes are shown below;
I'm trying to get the timing and display it onto the combo boxes but however, the timing of combo box 2 will minus off from combo box 1. For instance, the timing are from 00:00:01 to 00:00:10. If the user selects 00:00:03 from combo box 1, combo box 2 will only display 00:00:04 to 00:00:10. Is this possible? Any help is appreciated, thank you.
Code:
Private Sub ComboBox1_Change()
ComboBox1.TextAlign = fmTextAlignCenter
Dim TheSheet As Worksheet
Dim SearchRange As Range
Dim FindRow As Range
Set SearchRange = Range("B1", Range("B65536").End(xlUp))
Set TheSheet = ActiveSheet
On Error Resume Next
With TheSheet
Set FindRow = SearchRange.Find(Me.ComboBox1, LookIn:=xlValues, LookAt:=xlWhole)
row_review1 = FindRow.Row
If row_review1 > 0 Then
.Cells(1, 24) = row_review1
row_review1 = vbNullString
Else
MsgBox Me.ComboBox1 & " cannot be found"
End If
End With
On Error GoTo 0
End Sub
Private Sub ComboBox2_Change()
ComboBox2.TextAlign = fmTextAlignCenter
Dim TheSheet As Worksheet
Dim SearchRange As Range
Dim FindRow As Range
Set SearchRange = Range("B1", Range("B65536").End(xlUp))
Set TheSheet = ActiveSheet
On Error Resume Next
With TheSheet
Set FindRow = SearchRange.Find(Me.ComboBox2, LookIn:=xlValues, LookAt:=xlWhole)
row_review2 = FindRow.Row
If row_review2 > 0 Then
.Cells(2, 24) = row_review2
row_review2 = vbNullString
Else
MsgBox Me.ComboBox2 & " cannot be found"
End If
End With
On Error GoTo 0
End Sub
I'm trying to get the timing and display it onto the combo boxes but however, the timing of combo box 2 will minus off from combo box 1. For instance, the timing are from 00:00:01 to 00:00:10. If the user selects 00:00:03 from combo box 1, combo box 2 will only display 00:00:04 to 00:00:10. Is this possible? Any help is appreciated, thank you.