How To Use And Configure The Property Of The List Box Activex Control In Excel Vba

 using excel activex set

And we continue with another of the important functions when creating your spreadsheet in Microsoft Excel, which is related to the ActiveX controls.

With it we can make it deploy a variety of options for the user to make their choice. That is why in the following article we will show how to use and configure the property of the list box ActiveX control in Excel VBA.

set activex

When you’re used to working with certain ActiveX controls , we realize that its use and configuration are performed almost identically. And only we will focus on specific elements. This allows us to simplify some steps, but overall it is very easy to use VBA list box.

As always, you mean another article that will show the use of functions of this application. Since knowledge of this application guarantees success and therefore it is good to know how to use the scroll bar in Excel ActiveX to move in a table.

How to use and configure the property of the list box ActiveX control in VBA Excel

So you can to use and configure the property of the list box ActiveX control in VBA Excel we must first draw a list box. To do this and we can insert a list box in Excel spreadsheet. We must turn to the top menu, it will select the Developer tab when the options are deployed, we clip Insert.

And then we will select the Picture option list ActiveX Controls section, now we will set the properties of this table. To do this we headed back to the Scheduler tab , then the group will choose Controls and finally we clip Properties

.

In this window we will call ListFillRange , & nbsp property; it will indicate ranges of cells which are those that contain the elements of the list box. For example we can put that ranges B1: B5, is where the values ​​are taken. This means that the list box will take its values ​​in that range.

Use code to use and configure the property of the list box ActiveX control in VBA Excel

But one of the most common forms used to indicate items containing a list box, is through a VBA code. Continuing with the above example, we can write the following code in the Workbook_Open:

Private Sub Workbook_Open ()

With Sheet. ListBox1

You may also be interested in:

.AddItem “Monday”

.AddItem “Tuesday”

.AddItem “Wednesday”

.AddItem “Thursday”

.AddItem “Friday”

.AddItem “Saturday”

End With

End Sub

And then when it is appropriate to open the book all options are added to the list box that has been called ListBox1. We can also associations of any cell in the list box. To enhance this in the properties window we will select the LinkedCell and there must specify which cell will be associated with the list box.

This way each time you make a selection at any option in the list box, the value of it will be reflected in the cell that have partnered. In this simple and easy way we can use and configure property of the list box ActiveX control in Excel VBA. And this without prior knowledge of code, or programming, or anything like it.

using excel activex

eta way we come to the end of another article, which seeks to expand a little your knowledge of the different functions that can be done with ActiveX.

Only constant practice, will allow you to be an expert in carrying out projects with the spreadsheet Excel and now met how to use and configure the property of the box list control ActiveX VBA Excel.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

Deja un comentario