disable combo change event temporaraly

  • Thread starter Thread starter sunilpatel
  • Start date Start date
S

sunilpatel

Application.EnableEvents = False

With ActiveSheet.ComboBox1
.ListIndex = 0 'this line does not seem to
disable 'Private Sub ComboBox1_Change()
.Visible = True
.Activate
End With

how can i remedy this pleas
 
Use

Application.EnableEvents = False

and

Application.EnableEvents = True

around the code in the first procedure. Then set up the other procedure like
this:

Private Sub ComboBox1_Change()
If Application.EnableEvents Then
' code here only runs if EnableEvents = True

End If
End Sub


- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - June 17-18 2009 - Charting and Programming
http://peltiertech.com/Training/2009-06-ACNJ/AdvExcelConf200906ACNJ.html
_______
 
Back
Top