ListBox ActiveX Control is used to display list of items to a list. ListBox can be used on the WorkSheet. Please find more details about ActiveX ListBox Control in the following chapter. You can see how to load items to listbox, how to move items from one listbox to another listbox, how to select items in a listbox, etc..,
VBA ActiveX ListBox Control on the Worksheet: Using ListFillRange
Please find more details about VBA ActiveX List Box Control and how we are adding it on the Worksheet. Here, we are using ‘ListFillRange’ Property of List box to add or load items to list box.
- Go To Developer Tab and then click Insert from the Controls
- Click on the List Box from the Activex Controls group.
- Drag a List Box on the Worksheet.
- Right click on the List box (Design Mode should be turned ON).
- Click on properties from the available list.
- On the left side find ‘ListFillRange’ from the available properties of a List Box.
- On the right side mention the Input Range. Ex: ‘A1:A5’. Please find the below screen shot for the same.
- On the Worksheet go to range ‘A1:A5’ enter the input data. Automatically you can see the input data loads into the List Box. Please find the below screen shot for the same.
- You can link the list box to a Worksheet cell. Right click on List box and select properties.
- On the left side find ‘LinkedCell’ from the available properties of a List Box.
- On the right side mention the linked cell as ‘E3’. Please find the below screen shot for the same.
- Now, you can see the selected list box item on the worksheet cell (‘E3’) (Design Mode should be turned OFF).
More Details About the ListBox Control
VBA ListBox Excel Macros Examples Codes Adding Clearing Multiple Items
Please find the following link for more details about VBA ListBox Excel Macros Examples and Codes Adding and Clearing Multiple Items.
VBA to Remove Duplicates in ListBox Excel
Please find more details about Remove Duplicates in ListBox in Excel VBA.
Excel VBA FAQs: Frequently Asked Questions
Please find the most frequently asked questions and answers for your reference. These are explained more detailed way with examples.
Read More …
can anyone help me. if i have a cell address from another sheet of same workbook in listbox. If i select that i want to go to that sheet and show the cell selection.
Please help me with it on mail as i am so new to vba.