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

Get FREE Advanced Excel Exercises with Solutions!

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.

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

Step 1: Preparing 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

Read More: How to Use VBA Input Function in Excel


Step 2: Inserting Command from Excel ActiveX Controls

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 Macro 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.

Download Practice Workbook

You can download the practice workbook from here.


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. 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.


Related Articles

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.

Tags:

Kawser Ahmed
Kawser Ahmed

Kawser Ahmed is a Microsoft Excel Expert, Udemy Course Instructor, Data Analyst, Finance professional, and Chief Editor of ExcelDemy. He is the founder and CEO of SOFTEKO (a software and content marketing company). He has a B.Sc in Electrical and Electronics Engineering. As a Udemy instructor, he offers 8 acclaimed Excel courses, one selected for Udemy Business. A devoted MS Excel enthusiast, Kawser has contributed over 200 articles and reviewed thousands more. His expertise extends to Data Analysis,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo