When you want to write VBA source code in excel, as a beginner, maybe you can not find where to start. This article will tell you how to enable the excel Developer tab and open the Microsoft Visual Basic for Applications window to write visual basic source code on both Windows & macOS.
1. How To Enable The Excel Developer Tab On Windows.
- To write VBA source code on windows, you need to first enable the Excel Developer tab.
- If you can not find the Developer tab on the excel top tab bar, you can follow the below steps.
- Click the excel File —> Options menu item to open the Excel Options popup dialog window.
- Click the Customize Ribbon menu item on the Excel Options window left panel.
- Select the Main Tabs item from the Customize the Ribbon drop-down list on the dialog right side.
- Check the Developer checkbox below the drop-down list.
- Now you can see the Developer tab when you create an excel worksheet.
2. How To Enable The Excel Developer Tab On macOS.
- Click the Excel —> Preferences… menu item in the excel top menu bar.
- Then it will open the Excel Preferences dialog window.
- Click the Ribbon & Toolbar icon in the Authoring section to open the Ribbon & Toolbar dialog.
- Click the Ribbon tab to select and show the menus in the Ribbon.
- Select the item Main Tabs from the Customize the Ribbon drop-down list on the right side of the window.
- Make sure the Developer checkbox is checked under the above drop-down list.
- Then you can see the Developer menu item on the excel top menu bar.
3. How To Open Visual Basic for Applications Window To Write Visual Basic Source Code.
- After you enable the Developer tab in excel, you can start to write VBA source code in it.
- Open an excel worksheet and select an object such as an image, shape, cell .etc.
- Click the Developer tab on the worksheet top area to show the developer ribbon.
- Then you can see the icons such as Visual Basic, Macros .etc.
- Click the Visual Basic icon, it will open the Visual Basic for Applications window.
- Then you can write VBA source code and run/debug the source code there.