开发者

Excel VBA: Selecting a range from a worksheet and use this data inside a form

开发者 https://www.devze.com 2023-03-06 04:55 出处:网络
I am trying to use a range to populate my combobox inside a fo开发者_运维问答rm I\'ve created. Now I can statically add items using the addItem method, but what if I have tables across various workshe

I am trying to use a range to populate my combobox inside a fo开发者_运维问答rm I've created. Now I can statically add items using the addItem method, but what if I have tables across various worksheets that contain the description and values - and want to use these as the source for the form.

Any clue?


Dim c
For Each c In Range("A1:A4")
    ComboBox1.AddItem c.Value
Next

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号