how to create a macro in windows 10
How to create a macro in Microsoft Word and Excel
Updated: 12/31/2020 by Computer Hope
A macro helps improve efficiency when creating documents and spreadsheets, adding or maintaining information, or creating forms for other people to fill out. Microsoft Word and Excel are popular software where people utilize macros to make data entry and retention easier. Macros in Word and Excel are created using the Visual Basic programming language or by recording actions performed.
To create a macro in Microsoft Word or Microsoft Excel, select from the list below and follow the instruction.
- Create a macro in Microsoft Word.
- Create a macro in Microsoft Excel.
Create a macro in Microsoft Word
To create a macro in Microsoft Word, choose how you want to create it, either manually or by recording actions, and follow the steps provided.
Create macro manually with Visual Basic
- In Microsoft Word, click the View tab in the menu bar.
- Click the Macros option.
- In the Macros window, type a name for the new macro in the Macro name text field.
- Click the Create button.
- The Microsoft Visual Basic for Applications program opens, where you can create the macro by typing the Visual Basic code manually.
- When you have completed the creation of the macro, click the Save icon in the menu bar and close the Visual Basic program.
Create macro by recording actions
- In Microsoft Word, click the View tab in the menu bar.
- Click the arrow below the Macros option and select the Record Macro option.
- In the Record Macro window, type a name for the new macro in the Macro name text field.
- Click the keyboard icon to assign a key combination to execute the macro.
- In the Customize Keyboard window, click in the Press new shortcut key field, then press the combination of keys you want to use for executing the macro in Microsoft Word. For example, you could press the keys Ctrl+Shift+M, and that key combination will be entered into the field automatically.
- Click the Assign button in the lower-left corner, then click the Close button.
- Recording of the macro begins immediately after clicking the Close button. Perform the actions you want to record and have the macro execute. You can type text, format the text, create a table, add shapes or pictures, and other actions.
- When you completed all the actions you want to include in the macro, on the View tab, click the arrow below the Macros option and select Stop Recording.
Create a macro in Microsoft Excel
To create a macro in Microsoft Excel, choose how you want to create it, either manually or by recording actions, and follow the steps provided.
Create macro manually with Visual Basic
- In Microsoft Excel, click the View tab in the menu bar.
- Click the Macros option.
- In the Macros window, type a name for the new macro in the Macro name text field.
- Click the Create button.
- The Microsoft Visual Basic for Applications program opens, where you can create the macro by typing the Visual Basic code manually.
- When you have completed the creation of the macro, click the Save icon in the menu bar and close the Visual Basic program.
Create macro by recording actions
- In Microsoft Excel, click the View tab in the menu bar.
- Click the arrow below the Macros option and select the Record Macro option.
- In the Record Macro window, type a name for the new macro in the Macro name text field.
- Click the keyboard icon to assign a key combination to execute the macro.
- In the Customize Keyboard window, click in the Press new shortcut key field, then press the combination of keys you want to use for executing the macro in Microsoft Excel. For example, you could press the keys Ctrl+Shift+M, and that key combination will be entered into the field automatically.
- Click the Assign button in the lower-left corner, then click the Close button.
- Recording of the macro begins immediately after clicking the Close button. Perform the actions you want to record and have the macro execute. You can enter data, format the data, create a chart or graph from the data, add formulas, and other actions.
- When you completed all the actions you want to include in the macro, on the View tab, click the arrow below the Macros option and select Stop Recording.
how to create a macro in windows 10
Source: https://www.computerhope.com/issues/ch001969.htm
Posted by: greenlyharsecy.blogspot.com
0 Response to "how to create a macro in windows 10"
Post a Comment