Null in a ComboBox.List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top