I am dynamically creating several comboboxes and I need them to have a style of 2. However, this cannot be set at runtime. Is there a way to set the style upon creation of the control.
This does NOT work:
Set cbo = Controls.Add("vb.ComboBox", "cbo")
cbo.Style = 2
cbo.Width = 2000
cbo.Top = Me.Height / 2 - cbo.Height / 2 - 2000
cbo.Left = Me.Width / 2 - cbo.Width / 2 - 1000
cbo.Visible = True