I dynamically add a ComboBox control to the form:
Set Combo1 = Controls.Add("VB.ComboBox", "Combo1")
I want to set its style to "Dropdown list":
Combo1.style = 2
But there is a compile error: "Can't assign to read-only property".
Then how to set the style of the ComboBox control if it is dynamically added to the form? Thanks a lot.