See solution in other versions of Excel:. You can access the VBA environment in Excel 2011 for Mac by opening the Visual Basic editor. First, be sure that the Developer tab is visible in the toolbar in Excel. The Developer tab is the toolbar that has the buttons to open the VBA editor and create Form Controls like buttons, checkboxes, etc.
Dec 05, 2018 Macros do indeed work properly in Excel 2011 for Mac. The problem is that the Macintosh does not support Active-X. This is an Apple issue, not Excel or Microsoft's.
To display the Developer tab, click on Preferences under the Excel menu at the top of the screen. When the Excel Preferences window appears, click on the Ribbon icon in the Sharing and Privacy section. In the Customize section, check Developer in the list of tabs to show. Then click on the OK button. Select the Developer tab from the toolbar at the top of the screen. Then click on the Editor option in the Visual Basic group.
Now the Microsoft Visual Basic editor should appear and you can view your VBA code.
Assign a Macro To assign a macro (one or more code lines) to the command button, execute the following steps. Right click CommandButton1 (make sure Design Mode is selected).
Click View Code. The Visual Basic Editor appears. Place your cursor between Private Sub CommandButton1Click and End Sub. Add the code line shown below. Note: the window on the left with the names Sheet1, Sheet2 and Sheet3 is called the Project Explorer. If the Project Explorer is not visible, click View, Project Explorer.
To add the Code window for the first sheet, click Sheet1 (Sheet1). Close the Visual Basic Editor.
Click the command button on the sheet (make sure Design Mode is deselected). Result: Congratulations.
You've just created a macro in Excel! Visual Basic Editor To open the Visual Basic Editor, on the, click Visual Basic.
The Visual Basic Editor appears.