Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to disable listbox change event

Use the click event instead.

--
Regards,
Tom Ogilvy

"miao jie" wrote in message
...
now I have a program in Excel
sub UserForm_Activate()
** listBox1.clear -- I wanna stop jump to listbox1_change here, how

to do it??
open DBconnection
listBox1.addItem rs.field(1)
......
close DBconnection
end sub

when listbox1's value change, I need use this value to reset listbox2
sub ListBox1__Change()
open dbconn

get some records from DB use listbox1.value
listbox2.clear
listbox2.additem....
.......

close dbconn
end sub

right now, if the grogram run to ** listBox1.clear , then will jump to

ListBox1__Change(), so the dbconnect have no change to close it. if I wanna
reopen this dbconnection, the errer is occured

How to deal with this situation, thanks a lot of !!!!

Miao jie



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
ListBox Click Event BHatMJ Excel Discussion (Misc queries) 6 June 21st 07 09:34 PM
Enable/Disable Worksheet Change Event code Stuart[_5_] Excel Programming 2 November 3rd 03 07:22 PM
Disable Change Event in Form No Name Excel Programming 5 October 31st 03 08:23 PM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM
Disable Worksheet change event Tim[_14_] Excel Programming 4 July 15th 03 01:27 AM


All times are GMT +1. The time now is 06:35 AM.

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

About Us

"It's about Microsoft Excel"