Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default object.EnableEvents = false

As we have application.enableevents = false where we can disable the
application events...is there a similar way to disable object events....

For example in the below example : I am looking for that every time the item
is removed from the combobox/listbox it should not go to combobox/listbox
change event.

Sub unpopulate_ListBoxes(ByRef listbox_Name As ComboBox)
Dim I As Integer
If listbox_Name.ListCount 0 Then
For I = 0 To listbox_Name.ListCount - 1
listbox_Name.RemoveItem (listbox_Name.ListCount - 1)
Next I
End If
End Sub

--
Ajit
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default object.EnableEvents = false

No, you need to create a variable and set that and test it in code.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ajit" wrote in message
...
As we have application.enableevents = false where we can disable the
application events...is there a similar way to disable object events....

For example in the below example : I am looking for that every time the

item
is removed from the combobox/listbox it should not go to combobox/listbox
change event.

Sub unpopulate_ListBoxes(ByRef listbox_Name As ComboBox)
Dim I As Integer
If listbox_Name.ListCount 0 Then
For I = 0 To listbox_Name.ListCount - 1
listbox_Name.RemoveItem (listbox_Name.ListCount - 1)
Next I
End If
End Sub

--
Ajit



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.EnableEvents DCPan Excel Worksheet Functions 3 October 18th 08 05:46 AM
application.EnableEvents nc Excel Discussion (Misc queries) 1 September 28th 05 04:00 PM
application.enableEvents jeffP Excel Programming 1 August 1st 04 03:12 PM
Application.EnableEvents Terry Excel Programming 2 April 2nd 04 08:25 PM
Stopping the use of enableevents Steven Revell[_3_] Excel Programming 3 November 21st 03 07:16 AM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"