cutegwapings
New Member
- Joined
- Oct 12, 2006
- Messages
- 47
I'm a newly registered user of MrExcel.com, and I'm glad to be here.
I just want to know how to populate combo boxes using for...next loop.
I'm using VB in excel, and I'm getting err message "Sub or Function not defined" when I tried to run the program.
Here's my code.
Private Sub Worksheet_Activate()
Dim I As Integer
For I = 1 To 5
ComboBox(I).Clear
ComboBox(I).AddItem "N/A"
ComboBox(I).AddItem "YES"
ComboBox(I).AddItem "NO"
ComboBox(I).Text = ComboBox1.List(0)
Next I
End Sub
Thank you so much!
I just want to know how to populate combo boxes using for...next loop.
I'm using VB in excel, and I'm getting err message "Sub or Function not defined" when I tried to run the program.
Here's my code.
Private Sub Worksheet_Activate()
Dim I As Integer
For I = 1 To 5
ComboBox(I).Clear
ComboBox(I).AddItem "N/A"
ComboBox(I).AddItem "YES"
ComboBox(I).AddItem "NO"
ComboBox(I).Text = ComboBox1.List(0)
Next I
End Sub
Thank you so much!