I have a Private Sub that runs if an ActiveX ComboBox is CHANGED. The problem is, every time you type a letter in the open field (if a selection is not available) the code fires and slows down your typing.
Is there a way to determine if the text field of the combobox is deselected and if so, THEN fire the code? I don't really want to use the Private Sub - Worksheet/SelectionChange option since I'd have a similar effect every time a cell was selected.
Here's the code that runs:
Is there a way to determine if the text field of the combobox is deselected and if so, THEN fire the code? I don't really want to use the Private Sub - Worksheet/SelectionChange option since I'd have a similar effect every time a cell was selected.
Here's the code that runs:
Code:
Private Sub ComboBox2_Change()
If Worksheets("JOB NAMES DATA").Range("K4") <> "x" Then
Worksheets("PRESS RUN").Range("AA2") = Worksheets("JOB NAMES DATA").Range("K4")
Worksheets("PRESS RUN").Range("Z2") = Worksheets("JOB NAMES DATA").Range("L4")
Worksheets("PRESS RUN").Range("AC2") = Worksheets("JOB NAMES DATA").Range("M4")
ElseIf Worksheets("JOB NAMES DATA").Range("K4") = "x" Then
Worksheets("PRESS RUN").Range("Z2:AA2") = ""
Worksheets("PRESS RUN").Range("AC2") = 1
End If
End Sub