Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Macros and VBA A macro is a set of instructions that tells Excel which commands to execute.

Slides:



Advertisements
Similar presentations
Introduction to Macro Introduction to Visual Basic for Application Recording a Macro Looking at the code of Recorded Macro.
Advertisements

© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 7: Developing an Excel Application
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Copyright © 2008 Pearson Prentice Hall. All rights reserved Copyright © 2008 Prentice-Hall. All rights reserved. Committed to Shaping the Next.
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 8: Macros, Importing and Exporting Data.
MACROS CS1100 Computer Science and its Applications CS11001.
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Chapter 12 Templates, Styles, and Macros by Mary Anne Poatsy, Keith Mulbery, Eric.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
Macros Excel built-in functions are great but limited Macros are a means for the user to define new functions A macro is a single command that automates.
Using the Visual Basic Editor Visual Basic for Applications 1.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson,
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Macros in Excel Intro to lab 1. Macroinstructions Macro is recorded in VBA module sequence of Excel operations Macros can automate tasks in Excel Macro.
Excel Lesson 14 Creating and Using Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
Microsoft Office Word 2013 Core Microsoft Office Word 2013 Core Courseware # 3250 Lesson 8: Using Productivity Tools.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Objectives © Paradigm Publishing, Inc. 1 Objectives.
With Microsoft Excel 2007 Comprehensive 1e© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2007 Comprehensive.
Macros n Macros are little programs that you can create to automate particular tasks that you may want to execute more easily than having to specify all.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Exploring Microsoft Office Word 2007 Chapter 7 The Advanced User Robert Grauer, Keith Mulbery,
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
1 ADVANCED MICROSOFT WORD Lesson 16 – Customizing Features Microsoft Office 2003: Advanced.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
ME 142 Engineering Computation I Macros. Key Concepts Macro Overview Recording a Macro Running a Macro Editing a Macro.
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
OCC Network Drives  H:\  P:\ 
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 13 Templates.
Data Analysis in Excel 2007 A Visual Guide By Nick Evangelopoulos May 2007.
Computer Literacy for IC 3 Unit 2: Using Productivity Software Chapter 3: Formatting and Organizing Paragraphs and Documents © 2010 Pearson Education,
Using Advanced Options Lesson 14 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft Word 2013.
Copyright © 2008 Pearson Prentice Hall. All rights reserved Copyright © 2008 Prentice-Hall. All rights reserved. Committed to Shaping the Next.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
MODULE 9 Integrating Word, Excel, Access, and PowerPoint © Paradigm Publishing, Inc.1.
Microsoft Office 2007 Excel Chapter 9 Part 4: Comparing and merging Workbooks.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
1 CA202 Spreadsheet Application Automating Repetitive Tasks with Macros Lecture # 12 Dammam Community College.
Macros in Excel Using VBA Time Required – 5 hours.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Excel Tutorial 8 Developing an Excel Application
Working with files from earlier versions
Microsoft Excel 2003 Illustrated Complete
Exploring Microsoft Excel
Microsoft Office Ribbon
ME 142 Engineering Computation I
Macro.
Lesson 1 - Automating Tasks
Microsoft Office Excel 2003
Microsoft Excel 2007 – Level 2
Presentation transcript:

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Macros and VBA A macro is a set of instructions that tells Excel which commands to execute Visual Basic a programming language used to create macros You do not have to be a programmer to write macros

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 2 Create a Macro with the Macro Recorder Comments provide information about the macro, but do not affect its execution and are considered documentation To use the recorder, click the Macros down arrow in the Macros group and select Record Macros From that point until you stop recording, every command you execute will be stored by the recorder

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 3 Create a Macro with the Macro Recorder Excel has two other file formats that store macros:  XLSM files, which are macro enabled workbooks, are stored using XML  XLSB files, which are workbooks stored in binary format, are often used for very large spreadsheets

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 4 Create a Macro with the Macro Recorder The Macro Recorder has some issues:  Everything you do once you begin recording a macro becomes part of the macro  Take your time and be sure the action is correct  Try to ensure your macros are broad enough to apply to a variety of situations The Visual Basic Editor (VBE) is used to create, edit, execute, and debug Excel macros

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 5 Create a Macro with the Macro Recorder

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 6 Create a Macro with the Macro Recorder To create a macro: 1. Click Record Macro in the Macros down arrow in the Macros group of the View tab to open the Record Macro dialog box 2. Type a name for the macro in the Macro name text box 3. Create a keyboard shortcut, if desired, for your macro in the Shortcut key box 4. Select a location to store the macro from the Store macro in drop-down arrow 5. Click OK to start recording the Macro

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 7 Create a Macro with the Macro Recorder

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 8 Create Macro Buttons May prefer to have a button on the Quick Access Toolbar Requires that the Developer tab is added to the Ribbon first  To place the Developer tab on the ribbon, click the Microsoft Office button and click Excel Options  Choose the Popular section and check Show Developer tab on the Ribbon

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 9 Work with Macro Security The proliferation of Excel macro viruses has made it a dangerous operation to open spreadsheets that contain viruses To counter this threat, when you open an Excel workbook that contains macros, Excel automatically disables the macros and displays the Security Warning Macros have been disabled message Click Options to open the Microsoft Office Security Options dialog box

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 10 Work with Macro Security

Copyright © 2008 Pearson Prentice Hall. All rights reserved. 11 Understand the basics of VBA Starting with Office 95, the recorded keystrokes of a macro were translated into Visual Basic commands Can execute Visual Basic programs from within Excel Microsoft Office uses a subset of Visual Basic known as Visual Basic for Applications (VBA) You are not expected to be a programmer, but you do need to know the capabilities of VBA and its relationship with Excel