How to make button in excel

Содержание

  • Процедура создания
    • Способ 1: автофигура
    • Способ 2: стороннее изображение
    • Способ 3: элемент ActiveX
    • Способ 4: элементы управления формы
  • Вопросы и ответы

Кнопка в Microsoft Excel

Excel является комплексным табличным процессором, перед которым пользователи ставят самые разнообразные задачи. Одной из таких задач является создание кнопки на листе, нажатие на которую запускало бы определенный процесс. Данная проблема вполне решаема с помощью инструментария Эксель. Давайте разберемся, какими способами можно создать подобный объект в этой программе.

Процедура создания

Как правило, подобная кнопка призвана выступать в качестве ссылки, инструмента для запуска процесса, макроса и т.п. Хотя в некоторых случаях, данный объект может являться просто геометрической фигурой, и кроме визуальных целей не нести никакой пользы. Данный вариант, впрочем, встречается довольно редко.

Способ 1: автофигура

Прежде всего, рассмотрим, как создать кнопку из набора встроенных фигур Excel.

  1. Производим перемещение во вкладку «Вставка». Щелкаем по значку «Фигуры», который размещен на ленте в блоке инструментов «Иллюстрации». Раскрывается список всевозможных фигур. Выбираем ту фигуру, которая, как вы считаете, подойдет более всего на роль кнопки. Например, такой фигурой может быть прямоугольник со сглаженными углами.
  2. Выбор фигуры в Microsoft Excel

  3. После того, как произвели нажатие, перемещаем его в ту область листа (ячейку), где желаем, чтобы находилась кнопка, и двигаем границы вглубь, чтобы объект принял нужный нам размер.
  4. Сдвиг границ в Microsoft Excel

  5. Теперь следует добавить конкретное действие. Пусть это будет переход на другой лист при нажатии на кнопку. Для этого кликаем по ней правой кнопкой мыши. В контекстном меню, которое активируется вслед за этим, выбираем позицию «Гиперссылка».
  6. Добавление гиперссылки в Microsoft Excel

  7. В открывшемся окне создания гиперссылки переходим во вкладку «Местом в документе». Выбираем тот лист, который считаем нужным, и жмем на кнопку «OK».

Окно создания гиперссылки в Microsoft Excel

Теперь при клике по созданному нами объекту будет осуществляться перемещение на выбранный лист документа.

Кнопка создана в Microsoft Excel

Урок: Как сделать или удалить гиперссылки в Excel

Способ 2: стороннее изображение

В качестве кнопки можно также использовать сторонний рисунок.

  1. Находим стороннее изображение, например, в интернете, и скачиваем его себе на компьютер.
  2. Открываем документ Excel, в котором желаем расположить объект. Переходим во вкладку «Вставка» и кликаем по значку «Рисунок», который расположен на ленте в блоке инструментов «Иллюстрации».
  3. Переход к выбору рисунка в Microsoft Excel

  4. Открывается окно выбора изображения. Переходим с помощью него в ту директорию жесткого диска, где расположен рисунок, который предназначен выполнять роль кнопки. Выделяем его наименование и жмем на кнопку «Вставить» внизу окна.
  5. Окно выбора рисунка в Microsoft Excel

  6. После этого изображение добавляется на плоскость рабочего листа. Как и в предыдущем случае, его можно сжать, перетягивая границы. Перемещаем рисунок в ту область, где желаем, чтобы размещался объект.
  7. Выравнивание размеров кнопки в Microsoft Excel

    Lumpics.ru

  8. После этого к копке можно привязать гиперссылку, таким же образом, как это было показано в предыдущем способе, а можно добавить макрос. В последнем случае кликаем правой кнопкой мыши по рисунку. В появившемся контекстном меню выбираем пункт «Назначить макрос…».
  9. Переход к назначению макроса в Microsoft Excel

  10. Открывается окно управление макросами. В нем нужно выделить тот макрос, который вы желаете применять при нажатии кнопки. Этот макрос должен быть уже записан в книге. Следует выделить его наименование и нажать на кнопку «OK».

Выбор макроса в Microsoft Excel

Теперь при нажатии на объект будет запускаться выбранный макрос.

Кнопка на листе в Microsoft Excel

Урок: Как создать макрос в Excel

Способ 3: элемент ActiveX

Наиболее функциональной кнопку получится создать в том случае, если за её первооснову брать элемент ActiveX. Посмотрим, как это делается на практике.

  1. Для того чтобы иметь возможность работать с элементами ActiveX, прежде всего, нужно активировать вкладку разработчика. Дело в том, что по умолчанию она отключена. Поэтому, если вы её до сих пор ещё не включили, то переходите во вкладку «Файл», а затем перемещайтесь в раздел «Параметры».
  2. Перемещение в раздел Параметры в Microsoft Excel

  3. В активировавшемся окне параметров перемещаемся в раздел «Настройка ленты». В правой части окна устанавливаем галочку около пункта «Разработчик», если она отсутствует. Далее выполняем щелчок по кнопке «OK» в нижней части окна. Теперь вкладка разработчика будет активирована в вашей версии Excel.
  4. Включение режима разработчика в Microsoft Excel

  5. После этого перемещаемся во вкладку «Разработчик». Щелкаем по кнопке «Вставить», расположенной на ленте в блоке инструментов «Элементы управления». В группе «Элементы ActiveX» кликаем по самому первому элементу, который имеет вид кнопки.
  6. Создание кнопки через элементы ActiveX в Microsoft Excel

  7. После этого кликаем по любому месту на листе, которое считаем нужным. Сразу вслед за этим там отобразится элемент. Как и в предыдущих способах корректируем его местоположение и размеры.
  8. Элемент ActiveX в Microsoft Excel

  9. Кликаем по получившемуся элементу двойным щелчком левой кнопки мыши.
  10. Щелчок по элементу ActiveX в Microsoft Excel

  11. Открывается окно редактора макросов. Сюда можно записать любой макрос, который вы хотите, чтобы исполнялся при нажатии на данный объект. Например, можно записать макрос преобразования текстового выражения в числовой формат, как на изображении ниже. После того, как макрос записан, жмем на кнопку закрытия окна в его правом верхнем углу.

Редактор макросов в Microsoft Excel

Теперь макрос будет привязан к объекту.

Способ 4: элементы управления формы

Следующий способ очень похож по технологии выполнения на предыдущий вариант. Он представляет собой добавление кнопки через элемент управления формы. Для использования этого метода также требуется включение режима разработчика.

  1. Переходим во вкладку «Разработчик» и кликаем по знакомой нам кнопке «Вставить», размещенной на ленте в группе «Элементы управления». Открывается список. В нем нужно выбрать первый же элемент, который размещен в группе «Элементы управления формы». Данный объект визуально выглядит точно так же, как и аналогичный элемент ActiveX, о котором мы говорили чуть выше.
  2. Создание элемента управления формы в Microsoft Excel

  3. Объект появляется на листе. Корректируем его размеры и место расположения, как уже не раз делали ранее.
  4. Объект на листе в Microsoft Excel

  5. После этого назначаем для созданного объекта макрос, как это было показано в Способе 2 или присваиваем гиперссылку, как было описано в Способе 1.

Кнопка на листе в программе Microsoft Excel

Как видим, в Экселе создать функциональную кнопку не так сложно, как это может показаться неопытному пользователю. К тому же данную процедуру можно выполнить с помощью четырех различных способов на свое усмотрение.

Еще статьи по данной теме:

Помогла ли Вам статья?

You can insert form controls such as check boxes or option buttons to make data entry easier. Check boxes work well for forms with multiple options. Option buttons are better when your user has just one choice.

Sample check boxes
Sample radio button controls

To add either a check box or an option button, you’ll need the Developer tab on your Ribbon.

Notes: To enable the Developer tab, follow these instructions:

  • In Excel 2010 and subsequent versions, click File > Options > Customize Ribbon , select the Developer check box, and click OK.

  • In Excel 2007, click the Microsoft Office button Office button image > Excel Options > Popular > Show Developer tab in the Ribbon.

  1. To add a check box, click the Developer tab, click Insert, and under Form Controls, click Button image.

    the check box control on the ribbon

    To add an option button, click the Developer tab, click Insert, and under Form Controls, click Button image.

    the radio button control on the ribbon

  2. Click in the cell where you want to add the check box or option button control.

    Tip: You can only add one checkbox or option button at a time. To speed things up, after you add your first control, right-click it and select Copy > Paste.

  3. To edit or remove the default text for a control, click the control, and then update the text as needed.

    edit text for a form control

Tip: If you can’t see all of the text, click and drag one of the control handles until you can read it all. The size of the control and its distance from the text can’t be edited.

Formatting a control

After you insert a check box or option button, you might want to make sure that it works the way you want it to. For example, you might want to customize the appearance or properties.

Note: The size of the option button inside the control and its distance from its associated text cannot be adjusted.

  1. To format a control, right-click the control, and then click Format Control.

    the Format Control dialog box options

  2. In the Format Control dialog box, on the Control tab, you can modify any of the available options:

    • Checked: Displays an option button that is selected.

    • Unchecked: Displays an option button that is cleared.

    • In the Cell link box, enter a cell reference that contains the current state of the option button.

      The linked cell returns the number of the selected option button in the group of options. Use the same linked cell for all options in a group. The first option button returns a 1, the second option button returns a 2, and so on. If you have two or more option groups on the same worksheet, use a different linked cell for each option group.

      Use the returned number in a formula to respond to the selected option.

      For example, a personnel form, with a Job type group box, contains two option buttons labeled Full-time and Part-time linked to cell C1. After a user selects one of the two options, the following formula in cell D1 evaluates to «Full-time» if the first option button is selected or «Part-time» if the second option button is selected.

      =IF(C1=1,»Full-time»,»Part-time»)

      If you have three or more options to evaluate in the same group of options, you can use the CHOOSE or LOOKUP functions in a similar manner.

  3. Click OK.

Deleting a control

  • Right-click the control, and press DELETE.

Currently, you can’t use check box controls in Excel for the web. If you’re working in Excel for the web and you open a workbook that has check boxes or other controls (objects), you won’t be able to edit the workbook without removing these controls.

Important: If you see an «Edit in the browser?» or «Unsupported features» message and choose to edit the workbook in the browser anyway, all objects such as check boxes, combo boxes will be lost immediately. If this happens and you want these objects back, use Previous Versions to restore an earlier version.

If you have the Excel desktop application, click Open in Excel and add check boxes or option buttons.

Home / Excel Basics / How to Add a Button in Excel

In Excel, users can add macro-enabled buttons on the worksheets and can run macros by just clicking on them.

Users can use these macro-enabled buttons to perform several different tasks like filtering data, selecting data, printing a worksheet, running formulas, and calculations just by clicking on the buttons.

Adding buttons and embedding the macros to them is easier. Excel has multiple ways to add the macro-enabled buttons to the worksheet. Below, we have some quick and easy ways mentioned for you to add the macro buttons in Excel.

Add Macro Buttons Using Shapes

Users can create buttons in excel using shapes. Creating buttons using shapes has more formatting options over the buttons created from Control buttons or ActiveX buttons. Users can change the design, color, font, and style of the button created using shapes.

  1. First, go to the “Insert” tab and then click on the “Illustrations” icon” then click on the “Shapes” option and select any rectangle button.
    1-illustration-shapes-icon
  2. After that, with the help of a mouse, draw the rectangular button on the worksheet.
    2-draw-a-rectangular-button
  3.  Now, to enter the text in the button, double-click on the button and insert the text.
    3-enter-text-to-the-button
  4. For formatting, go to the “Shape Format” tab and you will get multiple options for the formatting of the button.
  5. From here, you can format the font style, font color, button color, button effects, and much more.
    4-shape-format-tab
  6. To edit the text, add the hyperlink, or add the macro, just right-click on the button and you will get the pop-up menu with multiple options.
  7. From here, you can edit the text, add the hyperlink, and can add the macro to the button.
  8. Now, select the “Assign Macro” option to add the macro to the button.
    5-right-click-on-the-button
  9. Once you select the “Assign Macro” option, you will get the “Assign Macro” dialogue box opened.
  10. From here, select the macro and click OK.
    6-assign-macro-window
  11. At this point, the button has become micro enabled, and when you move your cursor on the button, the cursor turns to the hand point cursor.
    7-micro-enabled-button
  12. To freeze the button movement, right-click on the button and select the “Format Shape” and select the option “Don’t move or size with cells”.
    8-freeze-the-button

Add Macro Buttons Using Form Controls

  1. First, go to the “Developer” tab and click on the “Insert” icon under the “Control” group on the ribbon.
    9-developer-tab
  2. After that, select the first button option from the “Form Controls” menu and draw a button on the worksheet.
    10-form-controls-button
  3. Now, select or type the macro name from the “Assign Macro” dialogue box and click OK.
  4. If you don’t have any macro created yet, you can click cancel to add the macro at a later stage.
    11-assign-macro-dialogue-box-
  5. From here, right-click on the button and select “Assign Macro” to add the macro to the button if did not assign yet.
  6. To format the button font size, style, color, etc. select the “Format Control” option.
    12-right-click-the-button
  7. Once you click on “Format Control”, you will get the “Format Control” window open and then can do the button font formatting.
    13-format-control-window
  8. To freeze the button movement, select the “Properties” tab and select the option “Don’t move or size with cells” and click OK.
    14-freeze-the-button-movement

Add Macro Buttons Using ActiveX Controls

  1. First, go to the “Developer” tab and click on the “Insert” icon under the “Control” group on the ribbon.
    15-developer-tab-insert-icon
  2. After that, select the first button option from the “ActiveX Controls” menu and draw a button on the worksheet.
    16-activex-controls-button
  3. Now, to create and insert the macro to the button, click on the “View Code” icon to launch the VBA editor.
    17-view-code
  4. Now, select the” CommandButton1” on the subprocedure and choose the “Click” option from the drop-down list on the right side of the editor.
    18-vba-editor

When we mention buttons in Excel, anyone who is not a consistent user will wonder what that means. Yes, Microsoft Excel does have Macros buttons which are the most advanced level of Excel. These buttons are commands initiated by a single click. It is easy to add buttons to excel. A user can simplify and save the time that they will take to navigate between different cells looking for specific information. In short, the buttons are inserted to perform specific tasks for us. The three different types of buttons you can place in a worksheet include;

  • Shapes
  • Form Control Buttons

This article shows how to add a button in Excel and how to assign Macros to them. With those buttons, navigating through your spreadsheet won’t be a nightmare anymore.

Method 1: Using shapes to create Macro buttons to open a particular sheet

You can create a macros button by using shapes. You can easily create a rounded rectangle; add a hyperlink to it for your worksheet. Here is what you can do;
1. On the main menu ribbon, click on the Insert tab.

2. Go to Shapes, click the drop-down arrow, and select the Rounded Rectangle icon.

3. Draw a rounded rectangle on your worksheet.

5. Format the shape by typing text into it-Right-click on the form and select edit text. Or double-click the shape.

6. To Hyperlink the shape, right-click on it and select Hyperlink from the menu. Right-clicking will display an Insert Hyperlink dialogue box.

  • Under the ‘Link to’ section, select ‘Place in This Document.
  • Under the ‘Type the cell reference’ section, type in the destination cell address.
  • Under the ‘Or select a place in this document box, click to choose the particular sheet name. Click the OK button when done.

When you click the rounded rectangle, it will skip to the specified cell of a specified sheet.

7. To assign the macro, right-click on the table and select Assign Macro. Under the ‘Macros in’ drop-down arrow, select ‘This Workbook’. Here, select the macro from the list of macros in This Workbook.

8. Press OK. When you point your mouse on this shape, it will turn to the hand pointer cursor, and clicking the form will run the macro. Remember to set your shape not to resize with cell changes by right-clicking on it and selecting ‘Size and Properties.’

Method 2: Using Developers Form Control Buttons to create buttons in Excel

1. On the main ribbon, click on the Developer tab.

2. Go to the Insert button and click the drop-down arrow.

3. Under Form Control, select the first option called button. Draw a button on your worksheet

4. Next, in the Assign Macro dialogue box, type or select a name for the macro.

5. Click OK when done. You can click on this button to run the macro.

Using ActiveX Controls

 Since running a macro in Excel can prove tedious, you can assign a macro to a button to run it faster. In this case, you can follow these steps to add a button in Excel using ActiveX controls easily.

1. Right-click anywhere on the Home ribbon and select Customize the Ribbon option from the pop-up menu. 

2. Once the Customize the Ribbon window is open, go to the Main Tabs section and select the Developer option.

3. Click OK. However, if you already have the Developer Tab added to your ribbon, then proceed as follows. 

4. Go to the Developer Tab and click on Insert.

5. Next, click on your preferred button under the ActiveX Controls.

You can now drag it anywhere in the Excel worksheet to create a button. 

6. Right-click on the newly created button and select the View Code option from the drop-down menu. 

7. You can now type this code, which sets the value of cell A6 to Hello:

Range(“A6”).Value = “Hello”

8. If you want to test setting the cell value, ensure the Design Mode option is deselected. You can also click on the button, and the Hello text will be displayed on your screen.

You can further use VBA codes to assign a different task for various operations such as double-clicking, single-clicking, right-clicking, and many more. When you right-click on the button, you can also select the Format Control option. However, the only downside is that the size of the buttons changes every time you make changes on the worksheet or share it.

Adding Macros To Quick Access Toolbar

Adding macros to Quick Access Toolbar also allows you to create buttons in Excel and use them on any sheet in your present workbook. To do this, follow these steps:

1. Right-click on the arrow below the ribbon of the Excel workbook.

2. When the Customize Quick Access Toolbar screen opens, navigate and select More Commands at the bottom.

3. Select Macros in the Choose commands from the section. You can click on the down-facing arrow in the Popular Commands box.

4. Select the HighlightMaxValue option and click on the Add button.

5. You can now click on Modify to customize the symbol of the macro.

6. Select your preferred symbol from the provided list and hit the OK button.

7. Finish by clicking OK to add a button to your Excel workbook. If you want to run the HighlightMaxValue macro, simply click on the icon.

Conclusion

When working with adding buttons to Excel, it is best to keep it easy and straightforward. The above methods portray these as the steps are short and easy to follow. They are not only easy to set up, but they also give you different options for formatting.

Contents

  • 1 How do I create a button in Excel?
  • 2 How do I make Excel buttons look good?
  • 3 How do I insert a button icon in Excel?
  • 4 What are Excel buttons?
  • 5 How do I create a button in Excel 2019?
  • 6 How do I add a button in Excel without the Developer tab?
  • 7 How do I create a Save button in Excel?
  • 8 How do I create a button shape in Excel?
  • 9 How do you customize a button in Excel?
  • 10 How do I create a button in Excel 2007?
  • 11 How do I create a command button to copy and paste data in Excel?
  • 12 What is the difference between form control and ActiveX control in Excel?
  • 13 How do you move a button in Excel?
  • 14 Where is the Save button found in Excel?
  • 15 What is the difference of Save button and save as button on Microsoft Excel?
  • 16 How do I add a email button in Excel?
  • 17 Where is Object button in Excel?

How do I create a button in Excel?

Click “Insert” in Controls Group

  1. Click “Insert” in Controls Group.
  2. Click “Insert” in the Controls group on the Developer tab in Excel.
  3. Select “Toggle Button”
  4. Select “Toggle Button” from the list of ActiveX Controls.
  5. Click where Button Should Appear.

How do I make Excel buttons look good?

Make sure the button is selected and then click the Format tab that will have appeared. From here, you can adjust almost any visual aspect of the button. However, the easiest thing to do is to click the More button for the Shape Styles section and choose a style from there. Now you should have a nicer looking button.

How do I insert a button icon in Excel?

Inserting icons
To insert an icon, click the Insert tab and then select Icons. The Insert Icons menu will appear. You can scroll through a wide range of subjects, including people, technology, commerce, the arts, and more. Once you find an icon you like, select it and then click Insert.

What are Excel buttons?

Buttons in excel are single-click commands which are inserted to perform certain task for us, buttons are used in macros and it can be inserted by enabling developer’s tab, in the insert form controls in excel.

How do I create a button in Excel 2019?

Add a button (Form control)

  1. On the Developer tab, in the Controls group, click Insert, and then under Form Controls, click Button .
  2. Click the worksheet location where you want the upper-left corner of the button to appear.
  3. Assign a macro to the button, and then click OK.

How do I add a button in Excel without the Developer tab?

Here are the steps to create the macro button:

  1. Draw a shape on the sheet (Insert tab > Shapes drop-down > Rectangle shape).
  2. Add text to the shape (Right-click > Edit Text | or double-click in the shape).
  3. Assign the macro (Right-click the border of the shape > Assign Macro…)
  4. Select the macro from the list.
  5. Press OK.

How do I create a Save button in Excel?

Adding “Save” Button in Excel
If you want to add a VBA save as button in Excel, you can do so using the “Developer” tab in the ribbon menu. Make sure you have enabled it by customizing the ribbon, and then click the “Insert” button; under “ActiveX Controls,” click the word “Button.”

How do I create a button shape in Excel?

Create Shapes for Macro Buttons

  1. On the Ribbon’s Insert tab, click Shapes, then click the shape that you want to use as a button.
  2. Then, click on the worksheet, where you want the top left corner of the button to appear.
  3. A shape will appear, in the default size.

How do you customize a button in Excel?

Steps

  1. Follow FILE > Options > Customize Ribbon path to access customizing options.
  2. Select a category from Choose commands from drop-down to see available commands.
  3. Click New Tab button to your custom tab.
  4. Select the commands you want to add from left-side list and click Add>> button to move them under new.

How do I create a button in Excel 2007?

MS Excel 2007: Creating a button

  1. When the Excel Options window appears, click on the Popular option on the left.
  2. Select the Developer tab from the toolbar at the top of the screen.
  3. Position your cursor in the spreadsheet and hold down the left mouse button and drag until your button is the correct size.

How do I create a command button to copy and paste data in Excel?

Create a Command Button to copy and paste data with VBA code

  1. Insert a Command Button by clicking Developer > Insert > Command Button (ActiveX Control).
  2. Draw a Command Button in your worksheet and right click it.

What is the difference between form control and ActiveX control in Excel?

As Hans Passant said, Form controls are built in to Excel whereas ActiveX controls are loaded separately. Generally you’ll use Forms controls, they’re simpler. ActiveX controls allow for more flexible design and should be used when the job just can’t be done with a basic Forms control.

How do you move a button in Excel?

Control click or right-click on the button, then click anywhere else in the workbook, the button should be like the following image, then put your cursor on it to check if you can move it. 4.

Where is the Save button found in Excel?

The first method is Save as button in left bar under File tab (Microsoft Excel 2010/2013) or Office Button (Microsoft Excel 2007). You can click this Save as button to save workbooks as other file types. The second methods is Save & Send button in left bar. In the middle section, you can select the Save & Send options.

What is the difference of Save button and save as button on Microsoft Excel?

The main difference between Save and Save As is that Save helps to update the lastly preserved file with the latest content while Save As helps to store a new file or to store an existing file to a new location with the same name or a different name.

How do I add a email button in Excel?

How to send email if button is clicked in Excel?

  1. Insert a Command Button in your worksheet by clicking Developer > Insert > Command Button (ActiveX Control).
  2. Right-click the inserted Command Button, then click View Code from the right-clicking menu as below screenshot show.

Where is Object button in Excel?

Click inside the cell of the spreadsheet where you want to insert the object. On the Insert tab, in the Text group, click Object. On the Create New tab, select the type of object you want to insert from the list presented.

Button in Excel as a link to a cell, a tool, or a created macro, makes the work in the program much easier. Most often, it is a graphic object with an assigned macro or a hyperlink. Let’s consider how to make such a button in Microsoft Excel program.



How to make a button on the Excel sheet

The essence of the work lies in creating a graphic object and assigning a macro or hyperlink to it. Let’s consider the order of actions in detail.

Ways to create a graphic object in Excel:

  1. An ActiveX control command button. Go to the «DEVELOPER» tab. Press the «Insert» ActiveX button. The menu with a set of items to insert will open. You need to select the first ActiveX element, that is depicted in in the form of a gray brick. Now draw the button of the required size using the cursor.
  2. ActiveX control.

  3. A Form control button. Again, go to the «DEVELOPER» tab. Open the menu of the «Insert» tool. Now select the «Button (Form Control)» element from the first group (the same gray-colored brick). Then draw the button. The window for assigning a macro opens immediately: you can assign it right now or later at your option.
  4. Form Control.

  5. A shape button. Go to the «INSERT» tab. In the «Recently Used Shapes» menu, select the appropriate shape. Draw this shape. You can right-click the finished shape and change its formatting.
  6. Draw this shape.

  7. A picture button. Go to the «INSERT» tab. In the «Illustrations» menu, select the «Pictures» tool. The options that are available on the computer will be offered to choose from.

picture button.

The graphic object has been created. Now you need to make it “able to work”.



How to make a button with macro in Excel

For example, you have created a macro to perform a specific task. To run it, you need to go to the «DEVELOPER» menu every time, which is inconvenient. It is much easier to create a special button.

If you have used an ActiveX control, then:

enter a command.

For other graphic objects, the macro is assigned in the same way. The procedure is even simpler. You need to right-click on the drawn button or picture and select the «Assign Macro» tool.

Assign Macro.

Other options of using buttons

With the help of buttons, you can not only execute created macros, but also move to a certain cell, another document, or another sheet in Excel program. Let us consider this matter in detail.

Draw a graphic object and highlight it. Find the «Hyperlink» on the «INSERT» tab.

Hyperlink.

After clicking, a window will be opened. This window is intended for creating a connection between the button and a file, web page, e-mail, new document, and location in the current Excel document.

opened.

It is enough to choose the desired option and specify the path to it. This method doesn’t require writing macros and provides the user with a wide range of opportunities.

Similar tasks can be performed with the help of macros. For example, for a user to go to a certain cell (M6) when clicking the button, the following code should be written:

Sub Macro1()
Range(«M6»).Select
End Sub

Similarly, you can assign a macro to a chart, WordArt and SmartArt objects.

How to make the sort button for tables in Excel

For an illustrative example, create a test table as in the figure:

illustrative example.

  1. Instead of the table column headers, add shapes that will serve as buttons for sorting by the columns of the table.
  2. column headers.

  3. In the Visual Basic mode (ALT + F11), insert the new module (Module1) in the Modules folder. To do this, right-click on the folder and choose Insert-Module.
  4. Insert-Module.

  5. Double click on Module1 and enter the following code into it:


    Sub Macro1()
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A2:A6"), _
            SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Sheet1").Sort
            .SetRange Range("A2:D6")
            .Apply
        End With
    End Sub
    Sub Macro2()
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("B2:B6"), _
            SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Sheet1").Sort
            .SetRange Range("A2:D6")
            .Apply
        End With
    End Sub
    Sub Macro3()
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("C2:C6"), _
            SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Sheet1").Sort
            .SetRange Range("A2:D6")
            .Apply
        End With
    End Sub
    Sub Macro4()
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("D2:D6"), _
            SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Sheet1").Sort
            .SetRange Range("A2:D6")
            .Apply
        End With
    End Sub

    Note. Red text indicates different parameters for each column.

  6. Assign to each shape its own macro: Macro1 for «NAME» Macro2 for «May», and so on.

That’s all, now you just need to click on the header and the table will sort the data to a particular column. For convenience, Macro1 sorts the column «NAME» in ascending order due to Order:=xlAscending parameter. All other columns have assigned macros (2,3,4) with Order:=xlDescending parameter, which sets the sort type in descending order. This is done in order to show the user in which month more goods have been sold.

Download example of the sort button

Note. Such simple macros can be created in automatic mode without programming or without writing VBA (Visual Basic for Application) code, using the «Record Macro» tool.

Содержание

  1. Add a check box or option button (Form controls)
  2. Formatting a control
  3. Deleting a control
  4. Need more help?
  5. How to make a button using a macro and hyperlink in Excel
  6. How to make a button on the Excel sheet
  7. How to make a button with macro in Excel
  8. Other options of using buttons
  9. How to make the sort button for tables in Excel
  10. Create Button Macro in Excel
  11. Create a Macro Button in Excel
  12. 3 Methods to Create Button in Macro Excel?
  13. #1 – Using Shapes
  14. #2 – Using Form Control Shapes & Active X
  15. Things to Remember
  16. Recommended Articles

Add a check box or option button (Form controls)

You can insert form controls such as check boxes or option buttons to make data entry easier. Check boxes work well for forms with multiple options. Option buttons are better when your user has just one choice.

To add either a check box or an option button, you’ll need the Developer tab on your Ribbon.

Notes: To enable the Developer tab, follow these instructions:

In Excel 2010 and subsequent versions, click File > Options > Customize Ribbon , select the Developer check box, and click OK.

In Excel 2007, click the Microsoft Office button > Excel Options > Popular > Show Developer tab in the Ribbon.

To add a check box, click the Developer tab, click Insert, and under Form Controls, click .

To add an option button, click the Developer tab, click Insert, and under Form Controls, click .

Click in the cell where you want to add the check box or option button control.

Tip: You can only add one checkbox or option button at a time. To speed things up, after you add your first control, right-click it and select Copy > Paste.

To edit or remove the default text for a control, click the control, and then update the text as needed.

Tip: If you can’t see all of the text, click and drag one of the control handles until you can read it all. The size of the control and its distance from the text can’t be edited.

Formatting a control

After you insert a check box or option button, you might want to make sure that it works the way you want it to. For example, you might want to customize the appearance or properties.

Note: The size of the option button inside the control and its distance from its associated text cannot be adjusted.

To format a control, right-click the control, and then click Format Control.

In the Format Control dialog box, on the Control tab, you can modify any of the available options:

Checked: Displays an option button that is selected.

Unchecked: Displays an option button that is cleared.

In the Cell link box, enter a cell reference that contains the current state of the option button.

The linked cell returns the number of the selected option button in the group of options. Use the same linked cell for all options in a group. The first option button returns a 1, the second option button returns a 2, and so on. If you have two or more option groups on the same worksheet, use a different linked cell for each option group.

Use the returned number in a formula to respond to the selected option.

For example, a personnel form, with a Job type group box, contains two option buttons labeled Full-time and Part-time linked to cell C1. After a user selects one of the two options, the following formula in cell D1 evaluates to «Full-time» if the first option button is selected or «Part-time» if the second option button is selected.

If you have three or more options to evaluate in the same group of options, you can use the CHOOSE or LOOKUP functions in a similar manner.

Deleting a control

Right-click the control, and press DELETE.

Currently, you can’t use check box controls in Excel for the web. If you’re working in Excel for the web and you open a workbook that has check boxes or other controls (objects), you won’t be able to edit the workbook without removing these controls.

Important: If you see an «Edit in the browser?» or «Unsupported features» message and choose to edit the workbook in the browser anyway, all objects such as check boxes, combo boxes will be lost immediately. If this happens and you want these objects back, use Previous Versions to restore an earlier version.

If you have the Excel desktop application, click Open in Excel and add check boxes or option buttons.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

How to make a button using a macro and hyperlink in Excel

Button in Excel as a link to a cell, a tool, or a created macro, makes the work in the program much easier. Most often, it is a graphic object with an assigned macro or a hyperlink. Let’s consider how to make such a button in Microsoft Excel program.

How to make a button on the Excel sheet

The essence of the work lies in creating a graphic object and assigning a macro or hyperlink to it. Let’s consider the order of actions in detail.

Ways to create a graphic object in Excel:

  1. An ActiveX control command button. Go to the «DEVELOPER» tab. Press the «Insert» ActiveX button. The menu with a set of items to insert will open. You need to select the first ActiveX element, that is depicted in in the form of a gray brick. Now draw the button of the required size using the cursor.
  2. A Form control button. Again, go to the «DEVELOPER» tab. Open the menu of the «Insert» tool. Now select the «Button (Form Control)» element from the first group (the same gray-colored brick). Then draw the button. The window for assigning a macro opens immediately: you can assign it right now or later at your option.
  3. A shape button. Go to the «INSERT» tab. In the «Recently Used Shapes» menu, select the appropriate shape. Draw this shape. You can right-click the finished shape and change its formatting.
  4. A picture button. Go to the «INSERT» tab. In the «Illustrations» menu, select the «Pictures» tool. The options that are available on the computer will be offered to choose from.

The graphic object has been created. Now you need to make it “able to work”.

How to make a button with macro in Excel

For example, you have created a macro to perform a specific task. To run it, you need to go to the «DEVELOPER» menu every time, which is inconvenient. It is much easier to create a special button.

If you have used an ActiveX control, then:

For other graphic objects, the macro is assigned in the same way. The procedure is even simpler. You need to right-click on the drawn button or picture and select the «Assign Macro» tool.

Other options of using buttons

With the help of buttons, you can not only execute created macros, but also move to a certain cell, another document, or another sheet in Excel program. Let us consider this matter in detail.

Draw a graphic object and highlight it. Find the «Hyperlink» on the «INSERT» tab.

After clicking, a window will be opened. This window is intended for creating a connection between the button and a file, web page, e-mail, new document, and location in the current Excel document.

It is enough to choose the desired option and specify the path to it. This method doesn’t require writing macros and provides the user with a wide range of opportunities.

Similar tasks can be performed with the help of macros. For example, for a user to go to a certain cell (M6) when clicking the button, the following code should be written:

Sub Macro1()
Range(«M6»).Select
End Sub

Similarly, you can assign a macro to a chart, WordArt and SmartArt objects.

How to make the sort button for tables in Excel

For an illustrative example, create a test table as in the figure:

  1. Instead of the table column headers, add shapes that will serve as buttons for sorting by the columns of the table.
  2. In the Visual Basic mode (ALT + F11), insert the new module (Module1) in the Modules folder. To do this, right-click on the folder and choose Insert-Module.
  3. Double click on Module1 and enter the following code into it:

Sub Macro1()
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Clear
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Add Key:=Range( «A2:A6» ), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets( «Sheet1» ).Sort
.SetRange Range( «A2:D6» )
.Apply
End With
End Sub
Sub Macro2()
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Clear
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Add Key:=Range( «B2:B6» ), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets( «Sheet1» ).Sort
.SetRange Range( «A2:D6» )
.Apply
End With
End Sub
Sub Macro3()
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Clear
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Add Key:=Range( «C2:C6» ), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets( «Sheet1» ).Sort
.SetRange Range( «A2:D6» )
.Apply
End With
End Sub
Sub Macro4()
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Clear
ActiveWorkbook.Worksheets( «Sheet1» ).Sort.SortFields.Add Key:=Range( «D2:D6» ), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets( «Sheet1» ).Sort
.SetRange Range( «A2:D6» )
.Apply
End With
End Sub

That’s all, now you just need to click on the header and the table will sort the data to a particular column. For convenience, Macro1 sorts the column «NAME» in ascending order due to Order:=xlAscending parameter. All other columns have assigned macros (2,3,4) with Order:=xlDescending parameter, which sets the sort type in descending order. This is done in order to show the user in which month more goods have been sold.

Note. Such simple macros can be created in automatic mode without programming or without writing VBA (Visual Basic for Application) code, using the «Record Macro» tool.

Источник

Create Button Macro in Excel

Create a Macro Button in Excel

We can automate the most common tasks in Excel to avoid unnecessary time consumption. Regarding automation, VBA macros are the way to go forward in Excel. Once the macro coding is completed, we need to execute that program to get the assigned job done. You must have already seen a button that can do the job in many of the worksheets, so once the programming is done, we can assign that work to one of the buttons so that the given job will be executed by click of the button. So in this article, we will take you through creating an Excel button to perform the task.

Table of contents

3 Methods to Create Button in Macro Excel?

As we know, macro coding is the perfect way to automate tasks. However, there is another small thing we can do to execute that code. Macro and buttons are the ideal combinations. It is like a “typical Indian marriage of boy likes a girl and girl likes a boy.” With just the click of the button, we can execute hundreds of lines, so some of the complex reports can be automated and handed over to our team members. But then, we have to click the button to get the job done.

So, we can create a button in three ways in Excel. Those are below:

  1. Shapes
  2. Active X Control
  3. Form Control in ExcelForm Control In ExcelExcel Form Controls are objects which can be inserted at any place in the worksheet to work with data and handle the data as specified. These controls are compatible with excel and can create a drop-down list in excel, list boxes, spinners, checkboxes, scroll bars.read more

You are free to use this image on your website, templates, etc., Please provide us with an attribution link How to Provide Attribution? Article Link to be Hyperlinked
For eg:
Source: Create Button Macro in Excel (wallstreetmojo.com)

We will see each one of them in detail now.

#1 – Using Shapes

The best and easiest way to create a button to assign a macro is using “Shapes” in Excel. We can insert a wide variety of shapes in Excel, and also we can format these shapes as we would like to make them look.

Before inserting shapes, below is the macro we had written to filter values in the below data.

Code:

So, now we will insert shapes to assign the macro.

Follow the below-given steps to assign macro to shape.

    We must first go to the “Insert” tab in Excel and find the “Shapes ” option.

Once we click on the ” Shapes ” drop-down list, we see many shape options. Select any of the shapes and draw on the worksheet.

After adding the shapes, we need to enter some text values, so right-click on the shape and choose “Edit Text.”

We must enter the text as we would like to convey the message to the user.

It is the default view of the shape.

We can format the shape under the “Format” tab.

Once the proper formatting is given to the shape, we need to click and choose “Assign Macro.”

Once the proper formatting is given to the shape, right-click and choose “Assign Macro.” Next, we must select the macro we would like to assign to the shape.

Now click on “OK,” Currently, the macro has been assigned to the shape.

We see the hand pointer indicating the click option when we hover on the shape. If we click, it will execute the assigned macro, and the value in cell G2 will be filtered.

#2 – Using Form Control Shapes & Active X

From “Form Controls,” we must select the “Button” option.

Then, draw this on the worksheet, and immediately we will get a list of macros.

We need to choose the macro we would like to assign and click on “OK” to close the above window.

As a result, now, a button is created to run the macro.

Like this, we can create a button in Excel to execute the macro.

Things to Remember

  • The Active X Control button requires further coding knowledge, so not covered in this article.
  • The basic difference between “Shape” and “Form Controls” is the formatting and style they look like.

Recommended Articles

This article has been a guide to Create Button Macro in Excel. Here, we discuss the top 3 methods using shapes, active X control, form controls, examples, and downloadable Excel templates. You may learn more about Excel from the following articles: –

Источник


Download Article


Download Article

  • Excel 2003
  • |

  • Excel 2007
  • |

  • Excel 2010
  • |

  • Excel 2013
  • |

  • Video
  • |

  • Tips
  • |

  • Warnings

Macros in Excel can save a great deal of time with repetitive tasks. By assigning macros to custom buttons, you can save even more time by bringing your macro only one-click from execution.

  1. Image titled Create a Custom Macro Button in Excel Step 1

    1

    Click Tools → Customize.

  2. Image titled Create a Custom Macro Button in Excel Step 2

    2

    Click the Toolbars tab.

    Advertisement

  3. Image titled Create a Custom Macro Button in Excel Step 3

    3

    Click the New button.

  4. Image titled Create a Custom Macro Button in Excel Step 4

    4

    Type a name for your new toolbar.

  5. Image titled Create a Custom Macro Button in Excel Step 5

    5

    Click OK.

  6. Image titled Create a Custom Macro Button in Excel Step 6

    6

    Click the Commands tab.

  7. Image titled Create a Custom Macro Button in Excel Step 7

    7

    Select Macros from the list on the left.

  8. Image titled Create a Custom Macro Button in Excel Step 8

    8

    Click and drag the Custom Button icon from the list on the right to your new toolbar. The new button is represented by a smiley face.

  9. Image titled Create a Custom Macro Button in Excel Step 9

    9

    Right-click on the newly added button.

  10. Image titled Create a Custom Macro Button in Excel Step 10

    10

    Rename the button to your liking or leave the default name in the Name: field.

  11. Image titled Create a Custom Macro Button in Excel Step 11

    11

    Click Edit Button Image… and change the image for your button or leave it the same. The Button Editor has controls similar to the Windows Paint program.

  12. Image titled Create a Custom Macro Button in Excel Step 12

    12

    Click «Assign Macro.«

  13. Image titled Create a Custom Macro Button in Excel Step 13

    13

    Select a macro you created from the list.

  14. Image titled Create a Custom Macro Button in Excel Step 14

    14

    Click OK.

  15. Image titled Create a Custom Macro Button in Excel Step 15

    15

    Click Close on the Customize dialog box.

  16. Advertisement

  1. Image titled Create a Custom Macro Button in Excel Step 16

    1

    Click the little arrow pointing down on the Quick Access Toolbar.

  2. Image titled Create a Custom Macro Button in Excel Step 17

    2

    Click More Commands.

  3. Image titled Create a Custom Macro Button in Excel Step 18

    3

    Select Macros from the Choose commands from list box.

  4. Image titled Create a Custom Macro Button in Excel Step 19

    4

    Select your macro from the left hand column and click the Add button.

  5. Image titled Create a Custom Macro Button in Excel Step 20

    5

    Select the macro that you just added from the right hand column and click the Modify button.

  6. Image titled Create a Custom Macro Button in Excel Step 21

    6

    Click the button image you want to represent your macro, type the display name you want in the Display name text box and click the ‘OK’ button.

  7. Advertisement

  1. Image titled 561154 22

    1

    Make sure the Developer tab is displayed. The Developer tab is a tab in the Ribbon at the top of Excel. If it is not displayed, follow these directions in order to display it:

    • Click File → Options → Customize Ribbons
    • Find the Developer check box in the Main Tabs section and click it. Press «OK» when you are done.
  2. Image titled 561154 23

    2

    Add «New Group» under the Developer Tab to create a custom group for the command/button that will be created.

  3. Image titled 561154 24

    3

    Still in the Customize Ribbon, click on the dropdown menu to choose command. Select Macro. Thereafter, all recorded macros will appear in the left box.

  4. Image titled 561154 25

    4

    Select the desired macro for button creation (make sure the newly added group is highlighted, you will know if the macro was added when it appear in the right box under your new group).

  5. Image titled 561154 26

    5

    You may now customize your button. Right-click and select Rename.

  6. Image titled 561154 27

    6

    If everything is set, Click «OK»

  7. Advertisement

  1. Image titled 561154 28

    1

    Make sure the Developer tab is displayed. The Developer tab is a tab in the Ribbon at the top of Excel. If it is not displayed, follow these directions[1]
    in order to display it:

    • Go to Excel → Preferences → Ribbon (Under Sharing and Privacy)
    • Under Customize, check the box next to the Developer tab, and press «OK»
  2. Image titled 561154 29

    2

    Click on the Developer tab and click Button. The Button icon is under the Form Controls group in the Developer tab and looks like a rectangular button.

  3. Image titled 561154 30

    3

    Place your button. Place your cursor where you’d like the button to go and drag to select the size of the button. You can make the button as small or as large as you’d like, given your needs. If you wish, you can move the button around after placement.

  4. Image titled 561154 31

    4

    Assign a macro when prompted. Excel should automatically prompt you to assign a macro to your button after you finish placing it. Once you’ve selected your macro, click «OK.»

    • If you are unfamiliar with what macros are or how to record them, read more. You should have a macro already built before you create the button.
  5. Image titled 561154 32

    5

    Format the button. Right-click on the newly created button and select «Format Control.» Select Properties → Don’t move or size with cells → OK. This helps you maintain the size and placement of your button. If you don’t have this property chosen, your button size and placement will change if you have it add, delete, or move cells.

  6. Image titled 561154 33

    6

    Rename the button. Change the text in the button to say whatever you’d like it to.

  7. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

  • Try using the 2003 method for Excel versions earlier than 2003.

  • Alternatively, you may add your macro button to an existing toolbar in versions 2003 and earlier.

  • If you prefer, it will let you assign a shortcut key in the dialog box. This can prevent wrist strain and save time.

Thanks for submitting a tip for review!

Advertisement

  • The user interface on versions earlier than 2003 may be different so the 2003 method may not be exactly the same for those versions.

  • If you want a different button image than what version 2007 offers, you will need to download additional software that specializes in modifying user interfaces for Microsoft Office.

Advertisement

About This Article

Thanks to all authors for creating a page that has been read 479,461 times.

Is this article up to date?

The buttons in Excel are single-click commands inserted to perform a certain task for us. They are used in macros:

  1. We can insert it by enabling the “Developer” tab.
  2. In the “Insert” form controls in excelExcel Form Controls are objects which can be inserted at any place in the worksheet to work with data and handle the data as specified. These controls are compatible with excel and can create a drop-down list in excel, list boxes, spinners, checkboxes, scroll bars.read more we can find button tab to insert.
  3. Then, we can draw the button on the worksheet.

Normally, the button is in the “Design Mode,”  but we can remove it after coding and use it.

While using the “Insert” option, first, we need to insert the “Developer” option in the Excel ribbon.

  • How to Insert Button in Excel
    • Steps to Insert Developer Option in Excel Ribbon
    • How to Make use of Insert Button Option in Excel?
    • How to add more Controls in Excel?
    • How to Format the Control Function in your Excel Sheet?
    • Things to Remember
    • Recommended Articles

Insert Button in Excel

Steps to Insert Developer Option in Excel Ribbon

  • Step #1 – We must first go to the “File” option and click on the “Options” at the bottom of the file option. option:

Insert Button Step 1

  • Step #2 – When we click on “Options,” it enables one dialog box and goes to “Customize Ribbon in excelRibbons in Excel 2016 are designed to help you easily locate the command you want to use. Ribbons are organized into logical groups called Tabs, each of which has its own set of functions.read more:

Insert Button Step 2

  • Step #3 – Now, we will be able to see so many options under the “Customize Ribbon” tab. Click on the checkbox adjacent to the “Developer,” enabling the “Developer” option in the Excel ribbon:

Insert Button Step 3

  • Step #4 – When we check the developer option, click Ok to confirm the same:

Insert Button Step 4

  • Step#5 – Now we will be able to see the developer tab in you excel ribbonEnabling the developer tab in excel can help the user perform various functions for VBA, Macros and Add-ins like importing and exporting XML, designing forms, etc. This tab is disabled by default on excel; thus, the user needs to enable it first from the options menu.read more option as shown below:

Insert Button Step 5

How to Make use of Insert Button Option in Excel?

Excel “Insert” button is used if we want to add the control in the documents. E.g., checkbox, scroll button, etc.

You can download this Insert Button Excel Template here – Insert Button Excel Template

Below are the steps of using insert button option in excel –

  1. We must select the data first and organize the data as per the requirement.

    Insert Option Step 1

  2. Then, go to the “Developer” tab and select the “Insert” option under the tab.

    Insert Option Step 2

  3. Click on the “Insert” and see what option is required in your data.

    Insert Option Step 3

  4. Now, click on the “Check Box” option. It enables us to create the checkbox in the sheet wherever required

    Insert Option Step 4

  5. Next, click on the cell in the data where we want to insert the checkbox. The “CheckBox (Form Control)”will appear nearby only to that place. If we need, we can adjust the box as per the requirement.

    Insert Option Step 5

  6. If we want to remove or edit the text on “Check Box 1,” which we created, right-click on the checkbox, select the text, and delete it or edit it as per the requirement. We can do one alternative: right-click on the checkbox and select “Edit.”

    Insert Option Step 6

  7. Copy all the columns’ check-in by dragging the “Column B1” checkbox to all the tabs or press “Ctrl+D” to paste the same in cells.

    Insert Option Step 7

  8. We can see that the same checkbox is shown in all the cells.

    Insert Option Step 8

  9. Now, we can easily use the checkbox by clicking on it, whether we have done the task.

    Insert Option Step 9

  10.  If we want to delete the checkbox option from the worksheet, press the right-click, choose the cell, and press the “Delete” key.

    Insert Option Step 10

How to add more Controls in Excel?

  • Step#1 – If you want to add more control in the insert tab, click on to more control option:

Add more Controls Step 1

  • Step#2 – When we click on more control, it opens the dialogue box, as shown below:

Add more Controls Step 2

  • Step#3 – Click on the control which we want to add and click Ok, It will automatically show in the insert button excel tab.

Add more Controls Step 3

How to Format the Control Function in your Excel Sheet?

  • Step#1 – Select the control option which we have inserted in your excel sheet:

Format the Control Step 1

  • Step#2 – Click right and go to format controls:

Format the Control Step 2

  • Step#3 – Once we click on “Format Control,” it opens one dialog box, as shown below.

Format the Control Step 3

  • Step#4 – Go to “Color” and “Line” to choose the color and line of the box.

Format the Control Step 4

  • Step#5 – Click Ok, we will get the color in the control option:

Format the Control Step 5

From the “Format” option, we can format the color and lines, size of the control, protection of control (locked or lock the text) so that no one can change the option, object positioning, Alt Text, and control.

Things to Remember

  1. While inserting a button in Excel, we must always check which option is required in the data.
  2. Always ensure that the control is of a size that is easily readable while inserting a button in Excel.
  3. While inserting a button in Excel, we can only add one checkbox or the options button at a time.
  4. Once we add the first control, click right and select “Copy” and “Paste” the control option to make it faster.
  5. We must always check to enable the “Developer” tab if it is allowed to insert a button in Excel.
  6. We cannot adjust the size of the options button inside the control and its separation from its related content.
  7. Do not oversize the control option while inserting a button in Excel.
  8. While adding a button, always ensure to text and the button’s size should be almost the same.
  9. We should not use the thick line for the box because it will not be able to see what is shown on the button.
  10. While inserting a button in Excel, we must always remember to make the control option feasible so that everyone can understand the same and find the information in the Excel sheet useful.

Recommended Articles

This article is a guide to Insert Button in Excel. Here, we discuss inserting the form control button in Excel, practical examples, and downloadable templates. You may learn more about Excel from the following articles: –

  • Creating a Dashboard in Excel
  • Remove Watermark in Excel
  • Excel Forms
  • Watermark in Excel

Reader Interactions

This tutorial is a detailed guide to creating interesting actionable buttons in Excel. If you want to learn to automate your Excel sheets by adding interactive buttons to your records, then this tutorial is made for you. Once we have created macros, we will learn to edit them in Excel.

Wait, what? You don’t know what macros are? Go ahead and read this article -> How to Record Macros in Excel?

If you’re still reading, I assume that you know what macros are and how to record them. So, let’s get started with this fun guide to creating some actionable buttons that you can use in your sheets to automate your data.

The best part is, you don’t have to be a VBA guru to create actionable buttons in Excel because this tutorial requires you to have zero knowledge in VBA to get started! Here are the steps to create actionable buttons without VBA in Excel.

Steps to create interactive buttons in Excel

This button will allow you to store the values from a user form to the database in the backend, refresh the table, or do whatever you want them to do for you. Isn’t it cool? You can get the experience of turning your spreadsheets into professional software.

To get started, let’s take an example of a user data entry form with a non-interactive button illustration below it.

buttons in Excel

You need to create two worksheets, one with the user form and the other with the database table where the user form data will be stored.

buttons in Excel

We will first record a macro in which we manually execute the action that is going to be done by the Submit button.

Here’s how to create interactive buttons in MS Excel 2016.

Here are the steps to create buttons in MS Excel 2019. Please follow the steps carefully. I have used a simpler example to help you understand better.

random details 1
  • Fill in random user details in the form.
  • Go to the View tab.
  • Pull down on Macros.
  • Click Record Macro.
  • Give your macro a name.
submit macro
  • Click OK. Now that the macro recording has started, follow these steps carefully without clicking anywhere else.
  • After clicking OK, copy the random user data you just filled in.
  • Go to the Database worksheet.
  • Right-click on the first empty cell in the table.
  • Pull right on Paste Special.
  • Choose the Transpose icon.
  • Don’t click anywhere yet!
transpose

Now that the first user entry is pasted horizontally, follow these final steps before ending the recording.

  • Go to the Home tab.
  • In the Cells group, pull down on Insert.
  • Click on Insert sheet rows.
  • Lastly, click on the first empty cell of the table again.
  • Don’t click anywhere yet!
new row
  • Navigate back to the user form sheet.
  • Delete the random entries you created from the cells.
  • Click on an empty cell in the sheet.
  • Stop recording the macro from the ribbon below, use your custom shortcut key, or choose Stop Recording from Macros in the View tab.

Woohoo, our macro is ready to be assigned to the Submit button!

assign macro
assign submit
  • Right-click on the submit button.
  • Click Assign macro.
  • Choose This workbook from the Macros in option below.
  • Choose the macro you just created.
  • Click OK.

Yay! It’s time to test your interactive button!

  • Clear all entries from the database sheet.
  • Fill in random user data in the form and click on the Submit button.
  • Navigate to the database sheet to check if the data is stored correctly.
  • Check with multiple user data to ensure everything working smoothly.

Conclusion

This tutorial was a detailed guide to creating interactive and actionable buttons in Excel without VBA. With this tutorial, you can easily automate any dataset and transform your works into smart and manageable records. Stay tuned at QuickExcel to learn more about smart Excel automation!

Понравилась статья? Поделить с друзьями:
  • How to make box in word
  • How to perform a test in excel
  • How to pdf a document in word
  • How to paste in word
  • How to paste in excel