Populate a combobox on a userform from cell values

后端 未结 1 1796
挽巷
挽巷 2021-01-06 20:04

How does one populate a combobox (on a userform) from cell B2 to however many the user chooses to enter.

相关标签:
1条回答
  • 2021-01-06 20:42

    For a column of values:

    Me.myCombo.List = Worksheets("mySheet").Range("B2:B100").Value
    

    For a row of values:

    Me.myCombo.List = Application.Transpose( _
              Worksheets("mySheet").Range("B2:M2").Value)
    
    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题