ComboBox ActiveX Control is used to store and display list of items to a list. ComboBox can be used on the WorkSheet. Please find more details about ActiveX ComboBox Control in the following chapter. You can see how to load items to a Combo Box, how to get the value of combo box items, etc..,
In this topic:
- VBA ActiveX ComboBox Control on the Worksheet: Using ListFillRange Property
- More Details About the ComboBox Control
VBA ActiveX ComboBox Control on the Worksheet: Using ListFillRange Property
Please find more details about VBA ActiveX Combo Box Control and how we are adding it on the Worksheet. We are using ListFillRange Property of Combo Box to add or load items to Combo Box.
- Go To Developer Tab and then click Insert from the Controls
- Click on the Combo Box from the Activex Controls group.
- Drag a Combo Box on the Worksheet.
- Right click on the Combo 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 Combo 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 Combo Box. Please find the below screen shot for the same.
- You can link the Combo Box to a Worksheet cell. Right click on Combo Box and select properties.
- On the left side find LinkedCell from the available properties of a Combo 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 Combo Box item on the worksheet cell [E3] [Design Mode should be turned OFF].
More Details About the ComboBox Control
VBA ComboBox Excel Macros Examples Codes Adding Clearing Items
Please find more details about Remove Duplicates in Combo Box in Excel VBA.
Read More
VBA Remove Duplicates in ComboBox
Please find the following link for more details about VBA Combo Box Excel Macros Examples and Codes Adding and Clearing Items.
Read More
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
Premium Project Management Templates
120+ Professional Project Management Templates!
A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.
LIMITED TIME OFFER
Advanced Project Planning Templates
Excel Templates
120+ Project Management Templates Pack
Excel | PowerPoint | Word
ULTIMATE RESOURCE MANAGEMENT TEMPLATE
Excel Template
50+ Essential Project Management Templates
Excel | PowerPoint | Word
Project Portfolio ManagementTemplates
Excel | PowerPoint Templates
50+ Excel Project Management Templates
Excel Templates
Share This Story, Choose Your Platform!
5 Comments
- ekacan October 9, 2015 at 1:48 AMLog in to Reply
I would like to create a VBA procedure that adds an ActiveX combo box in a worksheet, and sets the properties, specifically the ListFillRange, Linkedcell, and Boundcolumn. I would like the placement to be on the row right after the last populated cell on column D.
I understand that I will create a button that runs a procedure which adds a listbox, but I have not been able to change its properties.
I appreciate the help.
- sousilva October 27, 2015 at 9:27 PMLog in to Reply
Try using object: [there are other ways, like using Shapes, I use this because I also need the objOLE for other reasons]
Dim wsRec As Worksheet
Dim sName As String
Dim objOLE As OLEObject
Set wsRec = ThisWorkbook.Sheets[Recs]
wsRec.OLEObjects.Add[ClassType:=Forms.ComboBox.1, Link:=False, DisplayAsIcon:=False, _
Left:=180, Top:=18.75, Width:=129, Height:=18.75].Name = sName
.
Set objOLE = wsRec.OLEObjects[sName]
objOLE.Object.BorderStyle = 1
objOLE.Object.SpecialEffect = 0
Set objOLE = Nothing
Set wsRec = Nothing- James August 20, 2020 at 3:31 PMLog in to Reply
Same here very helpful.
Thank you
- pranav prakash February 16, 2018 at 1:28 PMLog in to Reply
Thanks a lot for this bit of code helped me a lot really
- Sree June 27, 2018 at 3:58 AMLog in to Reply
Thankyou. This code helped me in understanding activeX combobox controls
Leave A Comment Cancel reply
You must be logged in to post a comment.