I got it, the problem was solved. I put this code below the module of GetTime()
Public Sub StopTimer()
On Error Resume Next
ld = Now + TimeValue("00:00:01")
Application.OnTime ld, Procedure:="GetTime", Schedule:=False
End Sub
Then inserted to the buttons of confirmation and cancel
Public Sub cmdClose_Click()
Application.Run "StopTimer"
Unload Me
End Sub
Private Sub cmdSelect_Click()
Sheets("Group SR").Range("N1") = ComboBox1.Value
Sheets("Group SR").Range("O1") = ComboBox2.Value
If ComboBox2.Value = "ALL OWNERS" Then
'MsgBox "Set to Per Group SR Query", vbInformation + vbOKOnly, "SR Query Confimation"
If ComboBox1.Value = "ALL STATUS" Then
Sheets("Group SR").Range("N1") = ""
End If
Else
Sheets("Group SR").Range("L1,N1") = ""
MsgBox "Set to Per Owner SR Query", vbInformation + vbOKOnly, "SR Query Confimation"
End If
Application.Run "StopTimer"
Unload Me
End Sub
Bookmarks