In that case you need to use a collection or an array.

Here's an example using a collection:
VB Code:
  1. 'In General Declarations
  2. Dim myCombo as Collection
  3.  
  4.  
  5. 'in form load (or where you want!)
  6. Set myCombo = New Collection
  7. Dim combo_number as Integer
  8. For combo_number = 1 to 5
  9.   myCombo.add AddCombo(frame1,combo_number)
  10. Next combo_number
  11.  
  12.  
  13. 'your functions
  14. Private Function AddCombo(Parent_Control as object, line as Integer) as ComboBox
  15.  
  16. Set AddCombo = Parent_Control.controls.add("Forms.ComboBox.1", "Combo" & line, true)
  17.  
  18. End Function
  19.  
  20.  
  21. Private Sub CommandButton1_Click()
  22. ' This is where i am having problems
  23.  
  24. Dim combo_number as Integer
  25. For combo_number = 1 to 5
  26.   myCombo(combo_number).Visible = False
  27. Next combo_number
  28.  
  29. 'OR
  30. Dim tmpCombo
  31. For Each tmpCombo in myCombo
  32.   tmpCombo.Visible = False
  33. Next tmpCombo
  34. :
  35. :
  36. End Sub