Download presentation
Presentation is loading. Please wait.
Published byLaureen Stone Modified over 9 years ago
1
Macros in Excel Intro to lab 1
2
Macroinstructions Macro is recorded in VBA module sequence of Excel operations Macros can automate tasks in Excel Macro could be – a part of current Excel worksheet (available in this worksheet only) or – recorded in special worksheet called personal (available in all user worksheets)
3
Macroinstructions To enable creation and use of macros: – In Excel Options: Turn on the Developer ribbon – Customize Ribbon Change options in The Trust Center: –Trust center settings/Macro Settings Disable all macros with notification Check: Trust access to the VBA project object model – To save worksheet including macro: Use Save as: Excel Macro-Enabled Workbook – To open workbook with macro: When open Security Warning will appear, press: Enable Content button
4
Macroinstructions To record a new macro – Bring Developer ribbon to front – Press: Record Macro button Fill popup window (name, where to store macro, description) – Start sequences to be recorded – Press: Stop Recording button.
5
Macroinstructions To use recorded macro, method 1, from developer ribbon – Bring Developer ribbon to front Press: Macros button Choos macro from the list Press Run button – Start sequences to be recorded – Press: Stop Recording button.
6
Macroinstructions To use recorded macro, method 2, add new button on the custom ribbon – Customize Ribbon (menu-options, right click on ribbon) – Add a New Tab – Find macro in right-hand window from commands group Macros – Add to the New Group in New Tab
7
Macroinstructions To use recorded macro, method 3, add a button to the Sheet – In Developer ribbon, group Controls, press Insert button – In the Form Controls part press button – Draw a button in the sheet – In the popup window choose a macro from the list – Press OK.
8
Macroinstructions To use recorded macro, method 4, – Use shortcut keys combination defined while macro was created
9
Macroinstructions Macros types – Macros with non relative references – Macros with relative references
10
Macroinstructions Macros with non relative references – They are default type – Macro works always on the same cells in worksheet – First step is the selection of the cell (cells)
11
Macroinstructions Macros with non relative references – Macro works always on the cells relative to active cell on macro start in worksheet. This cell is the Basic Cell – If the macro have to be used on another part of the Sheet last operation recorded in the Sheet have to be the activation of the new Basic Cell
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.