ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform ComboBox populate using code? (https://www.excelbanter.com/excel-programming/367640-userform-combobox-populate-using-code.html)

Marc Cowlin

Userform ComboBox populate using code?
 
Hi,

I am currently developing a user form which has tick boxes in three
different groups, that will automatically select the correct equipment info
in the calculation worksheet when it loads.

I need to identify which is the primary equipment (the second, third, fourth
.... etc etc doesn't matter, just the first set).

I beleive I have two ways to proceed:

i). Add a toggle button along with each tickbox - want to really avoid this
as I am short on room, and also it looks really ugly.
ii). Use a combobox to select the primary equipment - would like this to be
dynamic and only present the options pre-selected by the tick boxes

Any ideas on how to move forward with this?

Any help would be very appreciated.

Regards



Marc

Tom Ogilvy

Userform ComboBox populate using code?
 
Private Sub Checkbox1_Click()
Combobox1.AddItem Checkbox1.Caption
End sub

Private Sub Checkbox2_Click()
Combobox1.AddItem Checkbox2.Caption
End sub


and so forth.

--
Regards,
Tom Ogilvy

"Marc Cowlin" wrote:

Hi,

I am currently developing a user form which has tick boxes in three
different groups, that will automatically select the correct equipment info
in the calculation worksheet when it loads.

I need to identify which is the primary equipment (the second, third, fourth
... etc etc doesn't matter, just the first set).

I beleive I have two ways to proceed:

i). Add a toggle button along with each tickbox - want to really avoid this
as I am short on room, and also it looks really ugly.
ii). Use a combobox to select the primary equipment - would like this to be
dynamic and only present the options pre-selected by the tick boxes

Any ideas on how to move forward with this?

Any help would be very appreciated.

Regards



Marc



All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com