Populate a combobox on a userform from cell values

后端 未结 1 1794
挽巷
挽巷 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)
提交回复
热议问题