Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear button adds to combo box lists
Hi all, when I press the clear button on my user form it repopulates the combo box list when I press the clear button. For instance when I operate Private Sub cmdClearForm_Click() Call UserForm_Initialize End Sub It adds the same information again to my drop down lists. i.e I have 5 names, when I press the clear button once, I get ten names, this is repaeted ad infinitum. What am I doing wrong? excel 2003 all updated on WinXP PRO Thank you all. ALan. -- alann2 ------------------------------------------------------------------------ alann2's Profile: http://www.excelforum.com/member.php...o&userid=37531 View this thread: http://www.excelforum.com/showthread...hreadid=572580 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear button adds to combo box lists
It sounds like you are using Additem. If so, you need to remove the existing
entires first. Combobox1.Clear for i = 1 to 5 Combobox1.AddItem "Item " & i Next as an example. -- Regards, Tom Ogilvy "alann2" wrote: Hi all, when I press the clear button on my user form it repopulates the combo box list when I press the clear button. For instance when I operate Private Sub cmdClearForm_Click() Call UserForm_Initialize End Sub It adds the same information again to my drop down lists. i.e I have 5 names, when I press the clear button once, I get ten names, this is repaeted ad infinitum. What am I doing wrong? excel 2003 all updated on WinXP PRO Thank you all. ALan. -- alann2 ------------------------------------------------------------------------ alann2's Profile: http://www.excelforum.com/member.php...o&userid=37531 View this thread: http://www.excelforum.com/showthread...hreadid=572580 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear button adds to combo box lists
The code that fills the list box add this to the top list1.clear This way it will clear it each time the code is calle -- drawling ----------------------------------------------------------------------- drawlings's Profile: http://www.excelforum.com/member.php...fo&userid=3662 View this thread: http://www.excelforum.com/showthread.php?threadid=57258 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear button adds to combo box lists
That was just what I needed. No doubt I'll be calling on youor services again. I only started Trying to Program Yesterday morning. Alan. -- alann2 ------------------------------------------------------------------------ alann2's Profile: http://www.excelforum.com/member.php...o&userid=37531 View this thread: http://www.excelforum.com/showthread...hreadid=572580 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a button in excel that adds one to a cell | Excel Discussion (Misc queries) | |||
Clear entries on Combo box | Excel Discussion (Misc queries) | |||
Clear unactive combo boxes | Excel Programming | |||
Macro to clear combo box values | Excel Programming | |||
How to clear all item from a combo box? | Excel Programming |