Combobox in Excel

ramankumar

New Member
Joined
Sep 8, 2002
Messages
33
I have a combobox in my excel spreat sheet. I want to use a macro to fill the combobox with data. In the format Control option dialog I want to use a macro in InputRange field. BUt i am not able to use a macro for this. Any help is appreciated.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Controls from the Control Toolbox are different from the old Excel controls (Forms Toolbar).

Activate the Control Toolbox and click the Design icon (top left). Right click your combo box and choose Properties. Set the ListFillRange property eg A1:A10 and close the Properties window. Click the Design icon again to exit design mode.
 

ramankumar

New Member
Joined
Sep 8, 2002
Messages
33
I want to display a range which is dynamic in nature. In this case how do i get the data filled in combobox.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You can use a named range for the ListFillRange property eg MyList. However, you may find that it does not refresh properly when the length of the list changes. You can force the refresh by using:

ListBox1.ListFillRange = "TheList"

in a suitable Sheet event procedure.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,865
Messages
5,598,530
Members
414,245
Latest member
Major Aly

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top