非常简单问题:
Dim myForm As Object
Set myForm = ThisWorkbook.VBProject.VBComponents.Add(3)
Set MyComboBox = myForm.Designer.Controls.Add("Forms.ComboBox.1")
With MyComboBox
.Left = 100
.Top = 20 + x * 10
.Height = 16
.Width = 100
For Each col In fields
.AddItem col
Next
End With
我可以清楚地打印出字段中的值(这是一个变体),但不知何故,Combobox仍然是空白的...任何想法?我在这方面浪费了太多时间...... 谢谢你的帮助