How to Use Activex Control in Excel (With Easy Steps)

This tutorial will demonstrate how to use ActiveX control in excel. ActiveX control is a more flexible design than any of the Form controls. Using ActiveX controls such as the command button, text boxes, list boxes, etc. can ease your work a lot. So, it is very important to learn how to use ActiveX control in excel.


Download Practice Workbook

You can download the practice workbook from here.


Step-by-Step Procedures to Use Activex Control in Excel

If you follow the steps correctly, you should learn how to use ActiveX control in excel on your own. The steps are:

Step 1: Arranging Dataset

In this case, our goal is to use ActiveX control by arranging a dataset. We have arranged a dataset in which we have the Input in column B.We’ll use a sample dataset overview as an example in Excel to understand easily.

Arranging Dataset to Use Activex Control in Excel


Step 2: Inserting Command Button

Now, we aim to use ActiveX control by inserting the command button option. The description of this step is.

  • At first, go to Developer > Insert > ActiveX Controls options.

Inserting Command button to Use Activex Control in Excel

  • Then, select the cell range and insert the CommandButton1 option.


Step 3: Applying VBA Code

Then, we will connect the button with a proper VBA code to function accordingly. The process of this step is.

  • Firstly, right-click on the button and select the View Code option.

VBA window to Use Activex Control in Excel

  • Secondly, the VBA window will come on the screen. Then, select the Module option from the Insert tab and insert the following code in the window.
Private Sub CommandButton1_Click()
    MsgBox "Hi Friend!, it's " & Time
End Sub

Inserting VBA code to Use Activex Control in Excel

  • Lastly, press the Run option and then if you click on the button, you will get the desired result.


How to Fix If Excel ActiveX Control Is Not Working

Suppose, you have followed the above steps correctly but still the button is not working then you have to enable the ActiveX controls to fix it. The steps to do so are.

Steps:

  • First, go to the File option.

Using File option to Use Activex Control in Excel

  • Second, click on the Info option and select the Turn Center Settings options.

  • Third, in the Trust Center dialog box, go to Trusted Documents > Allow Documents on a network to be trusted > OK options.

  • Last, if it still doesn’t work, then in the Trust Center dialog box, go to ActiveX Settings > Enable all controls with restrictions > OK options.

  • Therefore, you will see that your problem is already fixed.

How to Remove Activex Control in Excel

In this case, our goal is to remove the ActiveX control in excel by following the below process.

Steps:

  • At first, select the ActiveX control button.
  • Next, go to the Developer tab.
  • Then, select the Design Mode to turn off the design mode.

Remove ActiveX control to Use Activex Control in Excel

  • Last, if you click on the ActiveX control button, you won’t see it working or any desired result.

Things to Remember

  • We have shown the steps of using the ActiveX control in excel. But before using it, you have to enable the ActiveX control settings at the beginning. Otherwise, it won’t work.
  • For using VBA code, the files must be saved as Excel-Macro Enabled Workbook. Otherwise, codes won’t work.

Conclusion

Henceforth, follow the above-described methods. Hopefully, these methods will help you to use ActiveX control in excel. We will be glad to know if you can execute the task in any other way. Follow the ExcelDemy website for more articles like this. Please feel free to add comments, suggestions, or questions in the section below if you have any confusion or face any problems. We will try our best to solve the problem or work with your suggestions.

Tags:

Kawser

Kawser

Hello! Welcome to my Excel blog! It took me some time to be a fan of Excel. But now I am a die-hard fan of MS Excel. I learn new ways of doing things with Excel and share them here. Not only how-to guide on Excel, but you will get also topics on Finance, Statistics, Data Analysis, and BI. Stay tuned! You can checkout my courses at Udemy: https://www.udemy.com/user/exceldemy/

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo