Hi,
How do I clear all combobox at one time?
Now i am clearing it one by one and i forsee that if i have alot of combobox, this list will go a long way..
Please Login or Register to view this content.
Hi,
How do I clear all combobox at one time?
Now i am clearing it one by one and i forsee that if i have alot of combobox, this list will go a long way..
Please Login or Register to view this content.
Last edited by jieyi; 03-13-2009 at 05:10 AM.
Hello jieyi,
This macro will clear all ComboBoxes (Control Toolbox type) on the active sheet provided you haven't changed the name from "ComboBox" and they are not loaded using the ListFillRange property.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Here is another spin on the same method. This assumes that you have named your controls in a defined manner such as: lstMyList_1, lstMyList_2, etc..
And you can combine this method and the one above as follows:Please Login or Register to view this content.
Please Login or Register to view this content.
Last edited by Tarball; 03-11-2009 at 03:55 PM.
Reach me at excel_help at bellsouth dot net
Somehow it didn't clear....
my ComboBox is named as "zebra_ComboBox1, zebra_ComboBox2, ..."
So i used to use this code
somehow it didn't clear all my combobox.. all the items are still in there.Please Login or Register to view this content.
You need to check the first 14 characters of the name for a match
Please Login or Register to view this content.
Hello jieyi,
This is similar to Andy's suggestion. Instead of using the Left string operator, the LIke operator is used to do a partial match. This approach offers more flexibility for comparisons.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks