View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gduron[_3_] gduron[_3_] is offline
external usenet poster
 
Posts: 1
Default Combobox | Add items | Object Required


I have several Combo boxes setup on my spread sheet with the following
naming conventions:

COMBO_<VARIABLE_<VARIABLE

So for example, one of my combo boxes is called: COMBO_1_1

Depending on certain criteria I want to populate one of the combo
boxes:

COMBO_1_1
COMBO_1_2
COMBO_1_3

What I can't figure out is how to reference my combo box as an object.

I could write the code like:

COMBO_1_1.AddItem "1 - Pizza"
COMBO_1_1.AddItem "2 - Chinese Food"

I want my code to be more dynamic than that though. I want to be able
to have variables where the numbers a

Dim i As Integer, x As Integer

i = 1
x = 1

COMBO_i_x.AddItem "1 - Pizza"
COMBO_i_x.AddItem "2 - Chinese Food"


If anyone can help me with this I would be much obliged.


--
gduron
------------------------------------------------------------------------
gduron's Profile: http://www.excelforum.com/member.php...o&userid=33239
View this thread: http://www.excelforum.com/showthread...hreadid=537912