RAYLWARD102
Well-known Member
- Joined
- May 27, 2010
- Messages
- 529
I've created a combobox in a userform initialize event.
After creating it and populating it with items successfully, I had some dynamic buttons that when pressed would add text to this combobox.
Here is how I made the combobox in the userform initialize
The question is this. How do I address that combobox in later coding.
I tried "userform3.combobox1.value" but recieve an error saying it can't find the object. Any idea's what I would use in place of "combobox1" to address that combobox?
After creating it and populating it with items successfully, I had some dynamic buttons that when pressed would add text to this combobox.
Here is how I made the combobox in the userform initialize
Code:
Dim cbb As Control
Set cbb = UserForm3.Controls.Add("Forms.combobox.1")
With cbb
.Top = 10
.Left = 5
.Height = 40
.Width = 500
.Font.Size = 28
For Each cell In spTY.Range("a2:a" & iRow).Cells
.AddItem cell.Value
Next cell
End With
The question is this. How do I address that combobox in later coding.
I tried "userform3.combobox1.value" but recieve an error saying it can't find the object. Any idea's what I would use in place of "combobox1" to address that combobox?