Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Null in a ComboBox.List
I'm looping thru a combobox list it works fine but at the end shows a Null
error. I tried adding " -1" at the end but won't work either since all the items are all strings For Each ccc In CbxAddress.List MsgBox ccc Next ccc Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Null in a ComboBox.List
On Oct 8, 8:14 pm, LuisE wrote:
I'm looping thru a combobox list it works fine but at the end shows a Null error. I tried adding " -1" at the end but won't work either since all the items are all strings For Each ccc In CbxAddress.List MsgBox ccc Next ccc Thanks in advance Hello LuisE, Here are the looping methods for both the Forms and Control Toolbox controls. Sub FormsComboBox() Dim Itm For Each Itm In ActiveSheet.DropDowns("Drop Down 1").List MsgBox Itm Next Itm End Sub Sub ToolboxComboBox() Dim Cbo As Object Dim Itm Set Cbo = ActiveSheet.OLEObjects("ComboBox1").Object For Each Itm In Cbo.List MsgBox Itm Next Itm End Sub Sincerely, Leith Ross |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Null in a ComboBox.List
Thanks Leith
I continue having the same error message. My Combobox is in a UserForm, loops thru the whole list and at last it the variable shows Null "Leith Ross" wrote: On Oct 8, 8:14 pm, LuisE wrote: I'm looping thru a combobox list it works fine but at the end shows a Null error. I tried adding " -1" at the end but won't work either since all the items are all strings For Each ccc In CbxAddress.List MsgBox ccc Next ccc Thanks in advance Hello LuisE, Here are the looping methods for both the Forms and Control Toolbox controls. Sub FormsComboBox() Dim Itm For Each Itm In ActiveSheet.DropDowns("Drop Down 1").List MsgBox Itm Next Itm End Sub Sub ToolboxComboBox() Dim Cbo As Object Dim Itm Set Cbo = ActiveSheet.OLEObjects("ComboBox1").Object For Each Itm In Cbo.List MsgBox Itm Next Itm End Sub Sincerely, Leith Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
Combobox list to leave ONLY related values in list ?? | Excel Programming | |||
Combobox List to list Numerical Values ONLY in Column A is specific Sheet.... | Excel Programming | |||
ComboBox list reliant on the entry from a different ComboBox | Excel Programming | |||
Excluding NULL values in an Excel List | Excel Programming |