View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
PaulW PaulW is offline
external usenet poster
 
Posts: 130
Default Same Items in 3 different Combo Boxes

for i = 1 to 3
userform1.controls("ComboBox" & i).additem "GA"
next i

Thats what I usually do.

"RyanH" wrote:

I have three Combo Boxes in a UserForm that I need to display all 50 state
initials. I usually write my code like this:

Private Sub UserForm_Initialize()

With cboCustomerST
.AddItem "GA"
.AddItem "TN"
.AddItem "NY"
'list all other state
End With

End Sub

Is there a faster way to do this with 2 other combo boxes instead writing
code for each combo box?

Thanks in Advance,
Ryan