You are on page 1of 3

ActiveX Controls

excel
#1 Excel tutorial on the net
Excel
Introduction
Basics
Functions
Data Analysis
VBA
300 Examples
Ask us
Ad by save on. More Info | Hide These Ads
29k Like Like

Learn how to create ActiveX controls such as command buttons, text boxes, list boxes etc. To create an ActiveX control in Excel VBA, execute the
following steps.
1. On the Developer tab, click Insert.
2. For example, in the ActiveX Controls group, click Command Button to insert a command button control.
3. Drag a command button on your worksheet.
4. Right click the command button (make sure Design Mode is selected).
5. Click View Code.
Ads by OnlineBrowserAdvertising Ad Options
Excel VBA ActiveX Controls - Easy Excel Macros http://www.excel-easy.com/vba/activex-controls.html
1 of 3 6/20/2014 11:04 AM
Note: you can change the caption and name of a control by right clicking on the control (make sure Design Mode is selected) and then clicking on
Properties. Change the caption of the command button to 'Apply Blue Text Color'. For now, we will leave CommandButton1 as the name of the
command button.
The Visual Basic Editor appears.
6. Add the code line shown below between Private Sub CommandButton1_Click() and End Sub.
7. Select the range B2:B4 and click the command button (make sure Design Mode is deselected).
Result:
Did you find this information helpful? Show your appreciation, vote for us.
29k Like Like
Go to Top: ActiveX Controls | Go to Next Chapter: Userform
Excel VBA ActiveX Controls - Easy Excel Macros http://www.excel-easy.com/vba/activex-controls.html
2 of 3 6/20/2014 11:04 AM
Learn more, it's easy
Text Box
List Box
Combo Box
Check Box
Option Buttons
Spin Button
Loan Calculator
Download Excel File
activex-controls.xls

Copyright (c) 2010-2014 www.excel-easy.com. Excel VBA Userform. All rights reserved.
excel 2010 tutorial | how to excel | microsoft excel 2010 | excel macro
Ads by OnlineBrowserAdvertising Ad Options
Excel VBA ActiveX Controls - Easy Excel Macros http://www.excel-easy.com/vba/activex-controls.html
3 of 3 6/20/2014 11:04 AM

You might also like