Excel VBA: how to cast a generic control object into a ComboBox object?

前端 未结 2 472
盖世英雄少女心
盖世英雄少女心 2020-12-10 04:11

I need to cast a generic VBA form control object into a ComboBox object so that I can add items to it. The generic object won\'t allow me to insert items into my existing li

2条回答
  •  渐次进展
    2020-12-10 04:58

    You can "cast" an VBA Object by using SET, eg:

    SET lbCurrentComboBox = ctlCurrent
    

提交回复
热议问题