Developer Tab In Excel

Publication Date :

Blog Author :

Edited by :

Download FREE Developer Tab Excel Template and Follow Along!
Developer Tab Excel Template.xlsx

Table Of Contents

arrow

What Is Developer Tab In Excel?

The Developer Tab in Excel is a tab that has some functions and tools used to generate Macros, create VBA applications, design forms, and import/export XML, that is not found in Excel by default. We have to enable the tab from the “Excel Options” window.

For example, when we open the Excel worksheet, by default, the Developer Tab will not be found, and the ribbon will be as shown below.

Home Tab

However, once we enable the “Developer” tab, the tab will be visible on the Excel ribbon always, even when we close and reopen the workbook, as shown below.

Developer - Tab

Developer - Checkbox

Key Takeaways

  • The Developer tab in Excel is an inbuilt feature that can be enabled or disabled as required to use some additional features, such as Macros, Form Controls, VBA editor, etc.,
  • We can run the VBA Macros in the following ways, Press the Function key F5. Assign a Macro to a button or a Text Box to run it. In the Visual Basic Editor window, press the “Run” button, as shown in the following image.
  • We can make a worksheet data interactive by using the options in the Controls group of the Developer Tab, such as Check Box, Spin Button, Scroll Bars, etc., as shown below.

How To Add Developer Tab In Excel?

The steps to add the Excel Developer Tab are as follows:

  1. Open a new Excel sheet and navigate to the “File” tab. Then, go to the “Options.”


    Developer Tab 1

  2. After clicking “Options,” we must select “Customize Ribbon” on the left. Next, select “Main Tabs” on the right, then check the “Developer” checkbox and click the “OK” button.


    Developer Tab 2

  3. As a result, the “Developer” tab would appear in the Excel file.


    Developer Tab 3

How To Write VBA Programs Using Developer Tab?

We can use the Developer Tab in Excel to write VBA programs, as follows:

First, open an Excel workbook - select the “Developer” tab - go to the “Code” group - click the “Visual Basic” option to open the “Visual Basic Editor”, as shown below.

Developer - Visual Basic - wallstreet

Now, the “Microsoft Visual Basic for Applications – Working Test.xlsx” window opens. Click the “Insert” tab - and select the “Module” option, as shown below.

VBA Module

Once the “Module” window opens, write the required VBA Code, and Run/Execute it.

Examples

We will consider examples to use the Excel Developer tab to write VBA programs.

Example Example #1 – Writing a Simple Code for Displaying “Hi, Welcome to VBA”.

The steps to write a simple VBA program are as follows:

  • First, navigate to the “Developer” tab, and select “Visual Basic.” A new window will pop up.
  • Next, double-click on “Sheet1 (Sheet1)”. A blank document or pane appears on the right side.
Developer Tab Example 1
  • Next, write the code shown in the image below, and click the “Run” button.
Developer Tab Example 2

A pop-up box would appear saying, “Hi, Welcome to VBA”, as shown above.

Example #1 Code Explanation:

  • Sub and End Sub are used as procedures or, say, the main body of the program.
  • Msgbox” is a functional feature in the VBA package that displays whatever is written in it here, for example (“Hi, Welcome to VBA”).

Save the above code as a .xlsm file to save the macro code.

Example #2 - Click on Button Feature

This particular feature enables anyone to run the code with the click of a button.

For better understanding, let us illustrate where a person dynamically enters their name and birthplace, which would be displayed as an output.

  • First, we must go to the “Developer” tab, click on the Radio buttons in excel, and select “Button (Form Control).”
Developer Tab Example 2

Now, drag it anywhere on the worksheet, and the following dialog box will appear. Rename the “Macro name.”

Developer Tab Example 2-1

Click the “New” button, and the following code page will appear.

Developer Tab Example 2-2

Example #2 - Coding part and Explanation

Developer Tab Example 2-3
  • Dim” function is used for declaring the variable, which can be the string, numeric, etc… (Here, name and birthplace are variables declared as string.)
  • “InputBox” is a functional feature in VBA wherein the user is asked for input.
  • Msgbox” is the functional feature in the VBA package, which displays whatever is written.

Now close the code page window.

Then, we must right-click on the button, select the “Edit Text” in the Excel where one had created the button, and rename it to “Name_Birth.”

Developer Tab Example 2-4

Click on the button, and enter the name and birthplace. Two prompts would pop up for name and birth (enter the name and birthplace, e.g., Dhrish and Pune).

Developer Tab Example 2-5
Developer Tab Example 2-6

After inserting the name, the following output appears.

Developer Tab Example 2-7

Now, save the file as the “.xlsm” file.

How To Record A Macro In Developer Tab?

We can record a Macro when we must perform a task repetitively, but want to save time on both the repetitive work and coding.

So, here is the earlier example that we took earlier. Consider the data given below. To color columns with formulae for every file, we can record the work by doing it first manually and then run it for other files.

Recording and Saving Macro 1

The steps to color columns F, G, and row total as yellow as formula columns and rows are as follows:

  • First, go to the “Developer” tab, and click on Record Macro in Excel.
Recording and Saving Macro 1-1

Once we click “Record Macro,” a dialog box will appear. Rename it to “Color_Yellow.”

Recording and Saving Macro 1-2

Now, color columns F, G, and row total as “Yellow”, as shown below.

Recording and Saving Macro 1-4

After the coloring, go to the “Developer” tab, and now click “Stop Recording”.

Recording and Saving Macro 1-5

Now, go to the “Developer” tab, click the “Visual Basic” option, and select “Module1”, as shown below.

Recording and Saving Macro 1-6

Next time, if we want to repeat the task, we can click the (“Run Macro”) button by copying and pasting the same code into the new Excel sheet using the link. Writing a simple code for displaying.

How To Ensure Macro Security Using Developer Tab?

To ensure Macro Security, we can enable password-protected macros if needed.

The steps to perform the Macro Security are as follows:

  • First, go to the “Developer” tab, and open “Visual Basic.”
Macro Security 1

Open the “Macro” for which code needs enabling of the password (e.g., we take the Color_Yellow macro as in the above example).

Macro Security 1-1

We must select “Tools” and “VBAProject Properties.”

Macro Security 1-2

Next, subsequently, a dialog box will appear. Here, select the “Protection” tab, check/tick the “Lock project for viewing”, enter the desired password, confirm it, and click “OK.”

Macro Security 1-3
  • Finally, save it as a .xlsm file while saving and closing it.

To cross-verify for Macro security, open the file and repeat steps 1,2 and 3. As a result, it will ask for a password. Insert the password, and click “OK”, to view the Code.

Macro Security 1-4

Important Things To Note

  • The Developer tab is a built-in tab in Excel.
  • It is easy to automate everything with the use of recording the macro.
  • The best part about this is run-time prompts, or the user prompts, which can be given by clicking the button in VBA.
  • We can also create forms or basic UI in VBA. Please refer to the references for the same.

Frequently Asked Questions (FAQs)

1

What Is VBA Macro used from the Developer Tab In Excel?

Arrow down filled
2

Why is the Developer Tab In Excel not working?

Arrow down filled
3

Explain the features available in the Developer Tab in Excel.

Arrow down filled