VBA create several textboxes/comboboxes dynamically in userform

后端 未结 2 1516
心在旅途
心在旅途 2021-01-07 01:33

I create dynamically a Userform with comboboxes and textboxes. one of each per row. The user will choose how many lines he wants. So far I can adjust the size of the Userfor

2条回答
  •  感情败类
    2021-01-07 02:21

    Set CBName = UF2.Designer.Controls.Add("forms.combobox." & i)

    The class String is ALWAYS Forms.ComboBox.1 - never .2 or .3

    Therefore do:

    Set CBName = UF2.Designer.Controls.Add("Forms.ComboBox.1")

提交回复
热议问题