insert alternatives combobox

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
 
B

Bernie Deitrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top