Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a value question
Current Code:
Private sub CommandButton5_Click() If Me.ListBox2.Value < "" Then Me.ListBox2.RemoveItem Me.ListBox2.Value End If End Sub I keep getting an error of Invalid Argument and it debugs to line 3 of this code sniplet. Please let me know if there is another way I can do this. It needs to take the selected value from ListBox2 when the button is clicked. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a value question
Try:
Me.ListBox2.RemoveItem Me.ListBox2.ListIndex -- Charles Chickering "A good example is twice the value of good advice." "trward79" wrote: Current Code: Private sub CommandButton5_Click() If Me.ListBox2.Value < "" Then Me.ListBox2.RemoveItem Me.ListBox2.Value End If End Sub I keep getting an error of Invalid Argument and it debugs to line 3 of this code sniplet. Please let me know if there is another way I can do this. It needs to take the selected value from ListBox2 when the button is clicked. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a value question
Thanks Charles. This fixed it right up. It removed the value.
"Charles Chickering" wrote: Try: Me.ListBox2.RemoveItem Me.ListBox2.ListIndex -- Charles Chickering "A good example is twice the value of good advice." "trward79" wrote: Current Code: Private sub CommandButton5_Click() If Me.ListBox2.Value < "" Then Me.ListBox2.RemoveItem Me.ListBox2.Value End If End Sub I keep getting an error of Invalid Argument and it debugs to line 3 of this code sniplet. Please let me know if there is another way I can do this. It needs to take the selected value from ListBox2 when the button is clicked. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help removing "space" character (question updated) | Excel Discussion (Misc queries) | |||
Removing items from worksheet by account number question | New Users to Excel | |||
Vlookup question -- removing bad numbers | Excel Discussion (Misc queries) | |||
question about removing text from cells, leaving numbers | Excel Discussion (Misc queries) | |||
Question about removing Web formats and content | Excel Programming |