In editing macros macro: An action or a set of actions that you can use to automate tasks. You can record macros in the Visual Basic for Applications programming language. , you should familiarize yourself with the Visual Basic Editor (Visual Basic Editor: An environment that writes new Visual basic for Applications code and procedures, and edits existing code and procedures.) The Visual Basic Editor includes a complete set of debugging tools to find syntax, run-time, and logical problems in your code. )。 The Visual Basic Editor can be used to write and edit macros that are attached to Microsoft Office Excel workbooks.
If the Development Tools tab is not available, display the tab by doing the following:
Click the Office button
, and then click Excel Options.
In the standard category, under preferences for using Excel, select the Show Developer tab in the Ribbon check box, and then click OK.
Note the Ribbon is a component of the Microsoft Office Fluent user interface.
To temporarily set the security level to enable all macros, do the following:
On the Development Tools tab, in the code group, click Macro Security.
Under Macro Settings, click Enable all macros (not recommended, potentially dangerous code may run), and then click OK.
Note to help prevent potentially dangerous code from running, we recommend that you restore any settings that disable all macros after you have finished using macros.
On the Development Tools tab, in the code group, click Macros.
In the Macro name box, click the macro you want to edit.
Click Edit.
Tip If you need to see Help for the Visual basic Editor, on the Help menu, click Microsoft Visual Basic Help, or press F1
Enable or disable macros using the Trust Center
The macro security settings are located in the Trust Center. However, if you work in an organization, your system administrator may have changed the default settings to prevent anyone from changing any settings.
Note When you change the macro settings in the Trust Center, the macro settings are changed only for the Office program that is currently in use, not for all Office programs.