Tutorial 8: Developing an Excel Application

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.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Workbook properties Workbook properties Workbook Sharing.
1 Linking & Consolidating Worksheets Applications of Spreadsheets.
With Microsoft Excel 2007 Comprehensive 1e© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2007 Comprehensive.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 7: Developing an Excel Application
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.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
Using the Visual Basic Editor Visual Basic for Applications 1.
Microsoft Excel 2003 Illustrated Complete Excel and Advanced Worksheet Management Customizing.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
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.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
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.
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.
Introduction to VBA. This is not Introduction to Excel We’re going to assume you have a basic level of familiarity with Excel If you don’t, or you need.
Access Tutorial 10 Automating Tasks with Macros
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
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.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Excel 2010 © 2011 The McGraw-Hill Companies,
1 ADVANCED MICROSOFT EXCEL Lesson 9 Applying Advanced Worksheets and Charts Options.
The Advantage Series ©2005 The McGraw-Hill Companies, Inc. All rights reserved Chapter 11 Developing Applications Using Excel Microsoft Office Excel 2003.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
OCC Network Drives  H:\  P:\ 
Key Applications Module Lesson 21 — Access Essentials
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Securing and Sharing Workbooks Lesson 11. The Review Tab Microsoft Excel provides several layers of security and protection that enable you to control.
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.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
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.
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.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Excel Tutorial 8 Developing an Excel Application
Data Validation and Protecting Workbook
Microsoft Excel A Spreadsheet Program.
Developing an Excel Application
Microsoft Office Illustrated
Microsoft Excel 2003 Illustrated Complete
Exploring Microsoft® Excel® 2016 Series Editor Mary Anne Poatsy
Exploring Microsoft® Word® 2016 Series Editor Mary Anne Poatsy
Exploring Microsoft Excel
Microsoft Office Excel 2003
Microsoft Excel 2007 – Level 2
Presentation transcript:

Tutorial 8: Developing an Excel Application

Objectives Create an application Create, edit, and delete defined names for cells and ranges Paste a list of defined names as documentation Use defined names in formulas Add defined names to existing formulas New Perspectives on Microsoft Excel 2010

Objectives Create validation rules for data entry Protect the contents of worksheets and workbooks Add, edit, and delete comments Learn about macro viruses and Excel security features Add the Developer tab to the Ribbon New Perspectives on Microsoft Excel 2010

Objectives Create and run a macro Edit a macro using the Visual Basic Editor Assign a macro to a keyboard shortcut and a button Save and open a workbook in macro-enabled format Minimize the Ribbon New Perspectives on Microsoft Excel 2010

Visual Overview New Perspectives on Microsoft Excel 2010

Excel Application and Defined Names New Perspectives on Microsoft Excel 2010

Planning an Excel Application A spreadsheet written or tailored to meet specific needs The interface helps others use it Typically includes reports and charts, a data entry area, a custom interface, instructions, and documentation New Perspectives on Microsoft Excel 2010

Naming Cells and Ranges Use a defined name to: Assign a meaningful, descriptive name to a cell or range Quickly navigate within a workbook to the cell with the defined name Create a more descriptive formula New Perspectives on Microsoft Excel 2010

Creating Defined Names Must begin with a letter or an underscore Can include letters, numbers, periods and underscores, but not other symbols or spaces Cannot be a valid cell address, function name, or reserved word Can include as many as 255 characters Short, meaningful names (5–15 characters) are more practical Are not case sensitive New Perspectives on Microsoft Excel 2010

Creating Defined Names Use the Name box to create defined names New Perspectives on Microsoft Excel 2010

Creating Defined Names Use the Selection dialog box to create defined names by selection New Perspectives on Microsoft Excel 2010

Creating Defined Names Use the Name Manager dialog box to edit and delete defined names New Perspectives on Microsoft Excel 2010

Creating Defined Names Use the Paste Names Command to generate a list of names Paste defined names in the Documentation worksheet after the workbook is complete New Perspectives on Microsoft Excel 2010

Using Defined Names in Formulas Descriptive formulas are simpler to enter and understand If a range reference is used rather than a defined name, defined names do not automatically replace the range reference in the formula New Perspectives on Microsoft Excel 2010

Adding Defined Names to Existing Formulas Defined names are not automatically substituted for cell addresses in a formula Replace cell addresses in existing formulas with their defined names to make formulas more understandable New Perspectives on Microsoft Excel 2010

Visual Overview New Perspectives on Microsoft Excel 2010

Data Validation and Protection New Perspectives on Microsoft Excel 2010

Validating Data Entry Ensures that correct data is entered and stored in a worksheet Protects cells with formulas from accidental deletion Reduces repetitious keystrokes and mouse clicks Each validation rule defines criteria for data that can be stored in a cell or range Use Data Validation dialog box to specify validation criteria, input message, and error alert for the active cell New Perspectives on Microsoft Excel 2010

Specifying Validation Criteria When you create a validation rule, specify the type of data allowed as well as a list or range of acceptable values (validation criteria) New Perspectives on Microsoft Excel 2010

Specifying Validation Criteria New Perspectives on Microsoft Excel 2010

Creating an Input Message Reduces the chance of a data-entry error Provides additional information about type of data allowed for the cell Appears as a ScreenTip next to selected cell New Perspectives on Microsoft Excel 2010

Creating an Error Alert Style and Message An error alert determines what happens after a user attempts to make an invalid entry in a cell that has a validation rule defined Tree error alert styles: Stop, Warning, and Information New Perspectives on Microsoft Excel 2010

Creating a List Validation Rule Restricts a cell to accept only entries that are on a list you create Create the list of valid entries in the Data Validation dialog box, or use a list of valid entries in a single column or row New Perspectives on Microsoft Excel 2010

Protecting a Worksheet and a Workbook Reduces data-entry errors by limiting access to certain parts of the workbook Prevents users from changing cell contents, workbook organization, or viewing formulas New Perspectives on Microsoft Excel 2010

Locking and Unlocking Cells A cell’s locked property determines whether changes can be made to that cell Locked property has no impact as long as worksheet is unprotected; after worksheet is protected, locked property is in control Default: Locked property is turned on for each cell, and worksheet protection is turned off Common practice: Protect the worksheet, but leave some cells unlocked New Perspectives on Microsoft Excel 2010

Protecting a Worksheet Specify the actions still available to users A protected worksheet can be unprotected Require a password to turn off protection only if you are concerned that users might make changes New Perspectives on Microsoft Excel 2010

Protecting a Workbook Keeps a worksheet from being modified Protecting the structure prohibits renaming, deleting, hiding, or inserting worksheets Protecting the windows prohibits moving, resizing, closing, or hiding parts of the window Default: Protect only the structure of the workbook, not the windows used to display it New Perspectives on Microsoft Excel 2010

Unprotecting a Worksheet and a Workbook A worksheet must be unprotected to edit its contents A workbook must be unprotected to change its structure New Perspectives on Microsoft Excel 2010

Inserting Comments Use comments to: Explain contents of a particular cell Provide instructions to users Share ideas and notes from several users collaborating on a project New Perspectives on Microsoft Excel 2010

Visual Overview New Perspectives on Microsoft Excel 2010

Working with Macros New Perspectives on Microsoft Excel 2010

Automating Tasks with Macros Macros perform repetitive tasks consistently and faster than you can After the macro is created and tested, tasks are done exactly the same way each time Use Developer tab to create and run macros New Perspectives on Microsoft Excel 2010

Protecting Against Macro Viruses Computer program designed to copy itself into other programs with the intention of causing mischief or harm Macro viruses Type of virus that uses a program’s own macro programming language to distribute the virus Microsoft Office 2010 provides several options for levels of security New Perspectives on Microsoft Excel 2010

Macro Security Settings Control what Excel will do about macros when the workbook is opened New Perspectives on Microsoft Excel 2010

Macro Security Settings Set macro security in the Trust Center Use Trusted Locations to define file paths for files considered trustworthy Use a digital signature to identify the author of a workbook that contains macros New Perspectives on Microsoft Excel 2010

Recording a Macro For simple macros, use the macro recorder to record keystrokes and mouse actions as they are performed For sophisticated macros, enter a series of commands in the Visual Basic for Applications (VBA) programming language New Perspectives on Microsoft Excel 2010

Running a Macro Either use the specified shortcut key or select the macro in the Macro dialog box New Perspectives on Microsoft Excel 2010

Options for Fixing Macro Errors Rerecord the macro using the same macro name Delete the recorded macro; record it again Run the macro one step at a time to locate the problem; use one of the previous methods to correct the problem New Perspectives on Microsoft Excel 2010

Working with the Visual Basic Editor Components Code window contains the VBA code Project Explorer window displays a treelike diagram consisting of every open workbook Menu bar contains menus of commands used to edit, debug, and run VBA statements Accessed through Macro dialog box or Visual Basic button in Code group on Developer tab New Perspectives on Microsoft Excel 2010

Working with the Visual Basic Editor New Perspectives on Microsoft Excel 2010

Understanding the Structure of Macros Each macro (sub procedure) begins with Sub followed by the name of the sub procedure and a set of parentheses (the arguments) Comments about the macro follow the statement and do not include any actions The body of the macro follows the comments End Sub statement indicates the end of the sub procedure New Perspectives on Microsoft Excel 2010

Understanding the Structure of Macros A Code window can contain several sub procedures Each procedure is separated from the others by SubProcedureName() statement at the beginning, and End Sub statement at the end Sub procedures are organized into modules New Perspectives on Microsoft Excel 2010

Editing a Macro Using the Visual Basic Editor The Visual Basic Editor provides tools to assist in writing error-free code As you type a command, the editor provides pop-up windows and text to help you insert the correct code New Perspectives on Microsoft Excel 2010

Creating Macro Buttons A macro can be assigned to a button placed directly in the worksheet Clicking a button (with a descriptive label) can be more intuitive and simpler than trying to remember combinations of keystrokes Form Controls New Perspectives on Microsoft Excel 2010

Creating Macro Buttons New Perspectives on Microsoft Excel 2010

Saving Workbooks with Macros Default Excel Workbook format is a macro-free workbook (.xlsx file extension) To save the workbook with the macros, save the file as a macro-enabled workbook (.xlsm file extension) New Perspectives on Microsoft Excel 2010

Opening a Workbook with Macros First time a workbook opens, a Security Warning appears in Message Bar providing the option to: Enable macros so they can be run, or Open the workbook with the macros disabled New Perspectives on Microsoft Excel 2010

Customizing the Ribbon Minimize the Ribbon Makes more space for a worksheet Only Quick Access Toolbar and tab names display Create new tabs and groups Hide tabs or commands Rename tabs or commands New Perspectives on Microsoft Excel 2010