PC Review


Reply
Thread Tools Rate Thread

disable combo change event temporaraly

 
 
sunilpatel
Guest
Posts: n/a
 
      29th Apr 2009
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


 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      29th Apr 2009
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...00906ACNJ.html
_______



"sunilpatel" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Change-event macro clr Microsoft Excel Programming 6 17th Aug 2009 04:19 PM
combo box change event =?Utf-8?B?VG9t?= Microsoft Excel Programming 3 11th May 2005 07:18 PM
Re: how to disable listbox change event Tom Ogilvy Microsoft Excel Programming 0 27th Jul 2004 05:55 PM
Disable Change Event in Form Microsoft Excel Programming 5 31st Oct 2003 08:23 PM
Disable Worksheet change event Tim Microsoft Excel Programming 4 15th Jul 2003 01:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 PM.