BeforeUpdate and Cancel
Thanks for reading my question,
I have a combo box that, upon changing the value, I wish
to ask the user if they are sure they want to make the
change as there are consequences.
How can I do this? I have tried if statements on the
_Change event of the combo box, but can't get that to
work, and can't get the combo box to look at the
BeforeUpdate () line (as is seen below).
I have also tried the solution posted by Todd on May 7,
and couldn't get it to work.
Thanks in advance,
Brad
Private Sub ComboBox2_BeforeUpdate(ByVal Cancel As
MSForms.ReturnBoolean)
Dim Answer As Variant
Answer = MsgBox("Changing this value will delete the
current list of feeds, and numbers of birds per feed
stage. This will affect the Feed Stage Combo boxes on
this sheet. Do you wish to continue?", 36)
If Answer = vbNo Then
Cancel = True
Else
GetProductNames
End If
End Sub
|