Interesting how you Excel types always assume it is Excel.
Two separate references to "cell".
It very well may be for Excel, but the OP has NOT mentioned anything (at all) about the application this is in. Nor has it been mentioned whether the control is on a Sheet (if Excel), or in a document (if Word). For all we know, this combobox could be on a userform.....in Word.
BTW: I am not being critical, I am trying to be somewhat amusing.
skipjakk, Geoff (xlbo) is correct though. The only way would be to take the current selection and put its value into a variable. His question is also significant.
"Are there any conditions for WHEN the last select should take place? "
The
when is crucial.
If the current value is put into a variable on _Change, then..that variable will always be the current selection. So, do you want to test whenever there IS a change? In which case, yes use _Change, but test at the very start, as in:
Code:
Sub ComboBox1_Change()
If [i]variable[/i] <> 0 Then
' .... your calculation/comparing code
' [b]then[/b] set the variable for the new value
Else
[i]variable[/i] = ComboBox1.ListIndex
End If
This is assuming you are using the numeric value of ListIndex, rather that the text values of each item ("April", "September").
In other words, if the variable is NOT 0, then it has been _Changed before, and the test is to be done.
If it is 0 (the Else), then just set the variable value.
The next _Change, the variable will not be 0, and so it will be tested.
Note that as you are going to be using multiple executions of _Change, the variable should be Public in the module, not Dim'd in the Sub.
Or....if this is Word (...just ribbing you Geoff), you could store the pervious selected item as a document Variable, rather than a Public variable in the module.
faq219-2884
Gerry
My paintings and sculpture