Set a flag in the _GotFocus event, reset it in the _LostFocus event.
Then, to determine whether the control has focus, check the value of
the flag.
As an aside, just for interest, this code determines that the user
changed the value, even if they select the same list choice (also:
consider when the user changes the combo using the keyboard):
Option Explicit
Private Enum owComboStateEnum
owComboStateNormal = 1
owComboStateIsDropping = 2
owComboStateDropped = 3
End Enum
Private m_lngComboState As owComboStateEnum
Private Sub ComboBox1_DropButtonClick()
ComboState = owComboStateIsDropping
End Sub
Private Sub ComboBox1_LostFocus()
ComboState = owComboStateNormal
End Sub
Private Sub ComboBox1_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Select Case ComboState
Case owComboStateIsDropping
ComboState = owComboStateDropped
Case owComboStateDropped
Debug.Print "Success: ComboBox1 will change from '" & _
ComboBox1.Value & "' to unknown."
ComboState = owComboStateNormal
End Select
End Sub
Private Property Let ComboState(ByVal NewValue As owComboStateEnum)
m_lngComboState = NewValue
End Property
Private Property Get ComboState() As owComboStateEnum
ComboState = m_lngComboState
End Property