Excel 2007 Unit I

2,600 views
2,486 views

Published on

These Slides are shared for Education purposes only,

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,600
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
238
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Excel 2007 Unit I

  1. 1. Microsoft Excel 2007 - Illustrated Automating Worksheet Tasks
  2. 2. <ul><li>Plan a macro </li></ul><ul><li>Enable a macro </li></ul><ul><li>Record a macro </li></ul><ul><li>Run a macro </li></ul><ul><li>Edit a macro </li></ul>Objectives Microsoft Office Excel 2007 - Illustrated
  3. 3. <ul><li>Use shortcut keys with macros </li></ul><ul><li>Use the Personal Macro Workbook </li></ul><ul><li>Assign a macro to a button </li></ul>Objectives Microsoft Office Excel 2007 - Illustrated
  4. 4. Unit Introduction <ul><li>A macro is a set of instructions that performs tasks in the order you specify </li></ul><ul><ul><li>Create macros to automate frequently performed tasks that require a series of steps </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  5. 5. Plan a Macro <ul><li>Create macros for tasks that you perform on a regular basis </li></ul><ul><ul><li>To create a macro, you record the series of actions in a special programming language </li></ul></ul><ul><ul><li>The sequence of actions is important, so a macro needs to be carefully planned </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  6. 6. Plan a Macro (cont.) <ul><li>Macro planning guidelines </li></ul><ul><ul><li>Assign the macro a name </li></ul></ul><ul><ul><li>Write out the steps the macro will perform </li></ul></ul><ul><ul><li>Decide how you will perform the actions </li></ul></ul><ul><ul><li>Practice the steps you want Excel to record and write them down </li></ul></ul><ul><ul><li>Decide where to locate the description of the macro and the macro itself </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  7. 7. Enable a Macro (cont.) <ul><li>Macro and viruses </li></ul><ul><ul><li>Macros can contain viruses which can damage your computer </li></ul></ul><ul><ul><li>Always disable macros if you are not working with them. </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  8. 8. Recording a Macro <ul><li>Use the Excel Macro Recorder to create a macro </li></ul><ul><ul><li>Click the Record Macro button </li></ul></ul><ul><ul><li>Name the macro </li></ul></ul><ul><ul><li>Enter the keystrokes and select the commands you want </li></ul></ul><ul><ul><li>Click the Stop Recording button </li></ul></ul><ul><li>Each action you record is translated into program code </li></ul>Microsoft Office Excel 2007 - Illustrated
  9. 9. Recording a Macro (cont.) Microsoft Office Excel 2007 - Illustrated Enter macro name here
  10. 10. Running a Macro <ul><li>Once you record a macro, you should test it to make sure it runs properly </li></ul><ul><ul><li>Select the macro in the Macro dialog box, then click Run to test it </li></ul></ul>Microsoft Office Excel 2007 - Illustrated Listed macros appear here
  11. 11. Editing a Macro <ul><li>The program instructions of a macro, called program code , are automatically recorded in the Visual Basic for Applications (VBA) programming language </li></ul><ul><ul><li>Each macro is stored as a module , or program code container attached to the workbook </li></ul></ul><ul><ul><li>Edit a macro with the Visual Basic Editor </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  12. 12. Editing a Macro (cont.) Microsoft Office Excel 2007 - Illustrated Comment Code window Project Explorer with open module Properties window Macro program code
  13. 13. Editing a Macro (cont.) <ul><li>Adding comments to Visual Basic code </li></ul><ul><ul><li>You can explain macro code by adding comments </li></ul></ul><ul><ul><li>Comments are explanatory text added to the lines of code </li></ul></ul><ul><ul><li>A comment must be preceded by an apostrophe </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  14. 14. Using Shortcut Keys with Macros <ul><li>Assign a shortcut key combination to run a macro </li></ul><ul><ul><li>Reduces the number of steps it takes to run a macro </li></ul></ul><ul><ul><li>Assign a shortcut key combination in the Record Macro dialog box </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  15. 15. Using Shortcut Keys with Macros (cont.) Microsoft Office Excel 2007 - Illustrated Shortcut to run macro
  16. 16. Using the Personal Macro Workbook <ul><li>Store commonly used macros in a Personal Macro Workbook </li></ul><ul><ul><li>The Personal Macro Workbook is always available no matter which workbook is open </li></ul></ul><ul><ul><li>Created the first time you store a macro </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  17. 17. Using the Personal Macro Workbook (cont.) Microsoft Office Excel 2007 - Illustrated Click to store in new blank workbook Stores macro in active workbook Click to store in Personal Macro Workbook
  18. 18. Using the Personal Macro Workbook (cont.) <ul><li>Working with the Personal Macro Workbook </li></ul><ul><ul><li>By default the Personal Macro Workbook is hidden as a precautionary measure so you don’t accidentally delete anything from it </li></ul></ul>Microsoft Office Excel 2007 - Illustrated
  19. 19. Assign a Macro to a button <ul><li>You can run a macro by assigning it to a button on your worksheet. </li></ul><ul><li>When you click the button the macro will run. </li></ul>Microsoft Office Excel 2007 - Illustrated
  20. 20. Assigning a Macro to a button (cont.) Microsoft Office Excel 2007 - Illustrated Add text to label the button
  21. 21. Summary <ul><li>Use Excel Macro Recorder to create a macro </li></ul><ul><li>Run a macro to test it </li></ul><ul><li>Use the Visual Basic Editor to edit a macro </li></ul><ul><li>Use shortcut keys with macros </li></ul><ul><li>Use the Personal Macro Workbook </li></ul>Microsoft Office Excel 2007 - Illustrated

×