insert alternatives combobox

  • Thread starter Thread starter CG Rosén
  • Start date Start date
C

CG Rosén

Good Evening Group,

On my UserForm there is a ComboBox linked to a SpinButton by below code:

Private Sub ComboBox1_Change()

NewVal = Val(ComboBox1.Value)
If NewVal >= SpinButton1.Min And _
NewVal <= SpinButton1.Max Then _
SpinButton1.Value = NewVal

End Sub

Is it possible to determine if the ComboBox value is manipulated by the
SpinButton or
if the ComboBox value has has been "manually" inserted?

Brgds

CG Rosén
 
CG,

The SpinButton has event handlers. You can use

Private Sub SpinButton1_Change()

to tell if the spinbutton was used to change the value.

HTH,
Bernie
MS Excel MVP
 
Back
Top