How to use and configure ActiveX command button and text control in Excel

Who I am
Craig Zacker
@craigzacker
Author and references

What is an ActiveX Command Button?

These special command buttons give us the opportunity to add functionality of form to Excel workbooks. As for their properties, these buttons have an infinity of properties that we can configure to our liking.

However, before we can see the properties of an ActiveX command button we have to press the option » Design mode «, In this way we can select the command button to start modifying its properties through a large list that we will see displayed ..



Any kind of button di commandinstead, it will have a pop-up window with its own characteristics, which will make the difference with the rest of the command buttons that we can insert in the spreadsheet. So inserting and configuring ActiveX controls in a spreadsheet in Excel is very valuable and important.

Steps to add an ActiveX command button

Next we will show you all the steps you need to follow to learn how add and configure an ActiveX command button in Excel in a simple way. We recommend that you simply follow each step to the letter so that you can complete the process successfully.

  • First of all you have to go to the form " programmer »Specifically in the control group. Then you need to click on the option » Inserisci «.
  • Then click on the option » ActiveX controls "And then on" command button "
  • Now click on the location in the spreadsheet where you want the top left corner of the command button you want to insert to appear.
  • To continue you have to go to the "controls" group and click on the "view code" option. After that, the basic visual editor will start, you will also need to make sure that the "click" box has been correctly selected in the drop-down list on the right.
  • Next, you need to execute one of the following options within the command button. In the first you have to choose the name of an existing macro in the book, in fact you can search for macros by clicking on the "macro" option found in the "code" group.
  • Also, to be able to run macros from a button, remember to write the macro names on different lines within the sub procedure. As for the second action, remember to add your VBA code if necessary.
  • Next you need to close the Visual Basic Editor and click on "design mode" to make sure this mode is disabled.
  • In case you want to run the VBA code which is part of the button, you need to click on the Active Command button we just created. By the way, did you know that you can use and set ActiveX list box control property in VBA Excel?



We are already half done.

  • If you want modify the ActiveX control, you need to make sure it's in design mode. Then, in the «Developer» tab, in the «Controls» group, you need to activate the design mode.
  • In case you want to specify, use and configure the properties of the command button control, you have to click on the "Properties" option located in the " Developer »On the right in the control group. Another way to do this is to right-click the command button and then click "properties"
  • Remember that before clicking on "properties" you have to make sure that the object whose properties you want to change is already selected.
  • Now, in the properties box you will see a huge list with each property and to see the detailed information of each one you just have to select it and press F1. Once this is done, a Visual Basic help menu.
  • You can also type the property name in the search box found in the Visual Basic Help menu.

That's all for today! In case this information has been useful to you, do not hesitate to share it with your friends so that they will learn the importance of ActiveX controls.



add a comment of How to use and configure ActiveX command button and text control in Excel
Comment sent successfully! We will review it in the next few hours.