SlideShare a Scribd company logo
1 of 19
Introduction to Microsoft Excel 2007 Macros
Contents Introduction to Macro Introduction to Visual Basic for Application Recording a Macro Looking at the code of Recorded Macro
Introduction to Visual Basic for Application Microsoft Excel 2007 in itself a tool which helps users to work with worksheets & workbooks with ease.   This tool is one of the ultimate timesaver, but there are numerous events when you have to do repetitive tasks which are of a very little value but consume your precious time; yet engage you in a less productive activity, which Excel may do automatically.   Microsoft Excel 2007 macro is the feature which eliminates or at-least minimize these events which take your precious time in repetitive tasks, and you will be able to capitalize this time in more productive & strategic activities.
Introduction to Visual Basic for Application - cont… Apart from automating repetitive tasks Microsoft Excel Macros may also be used to create user interfaces User interfaces are screens where user can give inputs with ease also it enables input validations
Introduction to Visual Basic for Application - cont… What is Visual Basic?Visual Basic is a language which is inherited from a very popular language BASIC. BASIC stands for Beginners All-purpose Symbolic Instruction Code. Visual Basic is called visual as you can do most of the program by click and go i.e. visually.  It’s an event driven & object based language. What is Event Driven Language?When we say event driven it means that you can write triggers which will initiate on specific events for example when user opens any document or saves any document What is Object Based Language?Object based language is language in which we can use objects & their properties i.e. we can use the Worksheet object and its property SheetName when some one clicks on a button
Introduction to Visual Basic for Application - cont… Visual Basic for ApplicationVisual Basic for Application is called VBA as it uses Visual Basic language and is capable of using application specific objects i.e. if we talk about VBA for Excel it can use Cell Object, Range Object, Worksheet Object, Workbook Object etc.
Recording your first Macro Microsoft Excel 2007 provides you a very helpful option which enables you to record a macro and also modify and run afterwards Microsoft Excel 2007 don’t provide you the macro recording option by default for enabling macro recording at first you need to enable the Developer Tab, next slide defines step by step procedure to enable Developer Tab
Enabling the Developer Tab Click on Office Button Click on Excel Options On Popular Tab checkShow Developer tab inRibbon
Enabling the Developer Tab Once you are done with the process you will have the Developer Tab ready
Recording your first Macro When you record macro Microsoft Excel 2007 provides you with 2 options either you can record a macro using Absolute References or Relative References If you go for Absolute References Excel’s behavior will be: You record a macro in Cell A1 type “Excel is Great” format Bold Cell B1 Whenever you play / run this macro Excel will always type “Excel is Great” in Cell A1 and format Bold Cell B1 no matter wherever your cursor is
Recording your first Macro You can refer to following tab that you can click on Use Relative References which will enable you to record a macro in relative cells, as discussed whenever a relative reference macro is executed it will run in-place
Recording your first Macro Click Developer Tab Click on Use Relative Reference Click on Record Macro 1 3 2
Recording your first Macro As soon as you press record macro button the following screen will appear In the Macro name boxyou have to type the nameof macro In Shortcut key you can typeshort cut key which invokethe Macro Store macro (will discussedlater) You can also provide description of the macro
Recording your first Macro As soon as you press OK in the previous dialog box two things happens first record macro button changesto Stop Recording Secondly Excel starts lookingfor your action and will recordthe same Please follow steps on the following slide to complete recording
Recording your first Macro Click on Cell A1 type “Excel is Great” Select cells from A1:C1 click on Home Tab and click on Merge & Center  Press Bold & Italics Now click on Developer Tab and click on Stop recording
Playing your Macro You can execute the macro you just recorded by either clicking on the Macro button on the Developer Tab or by pressing Alt F8 , you can see the list of Recorded macros in the dialog box you can press Run buttonto execute the macro as soonas you press run you can seethat your recorded macro willexecute
Behind the scenes To see what Excel did behind the scenes you can either click on Macros button on Developer Tab and select Edit or you can press Alt F11
What it looks like This is what Excel did behind the scenes, it written the code for you.  You can change the code if you want.  You can either closethe window or pressAlt F11 again to goback to your Excelnormal screen
Conclusion Macros are used to automate tasks or you can use macros to develop user interfaces Excel Macro use a language called VBA (Visual Basic for Applications), which is both Event Driven and Object Based The easiest way to look at macro is by using the Excel’s record Macro Feature You can even edit Excel’s recorded macro by yourself Soon we will publish a presentation which will guide you on how to write your own macro Please visit www.exceladvise.com For more on Excel Functions Please comment if you like it, or have any suggestions. 19 Photo Courtesy – www.freedigitalphotos.net

More Related Content

What's hot

Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1Er. Nawaraj Bhandari
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1Vijay Perepa
 
Microsoft Excel 2016 Basics Course contents
Microsoft Excel 2016 Basics Course contentsMicrosoft Excel 2016 Basics Course contents
Microsoft Excel 2016 Basics Course contentsAnil Kumar
 
MS Excel Detailed into.pptx
MS Excel Detailed into.pptxMS Excel Detailed into.pptx
MS Excel Detailed into.pptxAssadLeo1
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel BasicsCompudon
 
Ms Excel Basic to Advance Tutorial
Ms Excel Basic to Advance TutorialMs Excel Basic to Advance Tutorial
Ms Excel Basic to Advance TutorialBikal Shrestha
 
MS-EXCEL Assignment Help
MS-EXCEL Assignment HelpMS-EXCEL Assignment Help
MS-EXCEL Assignment HelpRahul Kataria
 
MS Excel Learning for PPC Google AdWords Training Course
MS Excel Learning for PPC Google AdWords Training CourseMS Excel Learning for PPC Google AdWords Training Course
MS Excel Learning for PPC Google AdWords Training CourseRanjan Jena
 
E-Book 25 Tips and Tricks MS Excel Functions & Formulaes
E-Book 25 Tips and Tricks MS Excel Functions & FormulaesE-Book 25 Tips and Tricks MS Excel Functions & Formulaes
E-Book 25 Tips and Tricks MS Excel Functions & FormulaesBurCom Consulting Ltd.
 
Excel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP FunctionsExcel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP FunctionsMerve Nur Taş
 
Intro to Excel Basics: Part I
Intro to Excel Basics: Part IIntro to Excel Basics: Part I
Intro to Excel Basics: Part ISi Krishan
 
A Quick Simple MS Excel Macro
A Quick Simple MS Excel MacroA Quick Simple MS Excel Macro
A Quick Simple MS Excel MacroPranav Ghode
 

What's hot (20)

Learn Excel Macro
Learn Excel Macro  Learn Excel Macro
Learn Excel Macro
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1
 
Microsoft Excel 2016 Basics Course contents
Microsoft Excel 2016 Basics Course contentsMicrosoft Excel 2016 Basics Course contents
Microsoft Excel 2016 Basics Course contents
 
Excel lesson01
Excel lesson01Excel lesson01
Excel lesson01
 
Word 2016
Word 2016Word 2016
Word 2016
 
Intro to Microsoft Excel 2007
Intro to Microsoft Excel 2007Intro to Microsoft Excel 2007
Intro to Microsoft Excel 2007
 
MS Excel Detailed into.pptx
MS Excel Detailed into.pptxMS Excel Detailed into.pptx
MS Excel Detailed into.pptx
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Excel Macro Magic
Excel Macro MagicExcel Macro Magic
Excel Macro Magic
 
MS Excel 2013
MS Excel 2013MS Excel 2013
MS Excel 2013
 
Ms Excel Basic to Advance Tutorial
Ms Excel Basic to Advance TutorialMs Excel Basic to Advance Tutorial
Ms Excel Basic to Advance Tutorial
 
MS-EXCEL Assignment Help
MS-EXCEL Assignment HelpMS-EXCEL Assignment Help
MS-EXCEL Assignment Help
 
MS Excel Learning for PPC Google AdWords Training Course
MS Excel Learning for PPC Google AdWords Training CourseMS Excel Learning for PPC Google AdWords Training Course
MS Excel Learning for PPC Google AdWords Training Course
 
Vba
Vba Vba
Vba
 
E-Book 25 Tips and Tricks MS Excel Functions & Formulaes
E-Book 25 Tips and Tricks MS Excel Functions & FormulaesE-Book 25 Tips and Tricks MS Excel Functions & Formulaes
E-Book 25 Tips and Tricks MS Excel Functions & Formulaes
 
MS Word Introduction and Tools.
MS Word Introduction and Tools.MS Word Introduction and Tools.
MS Word Introduction and Tools.
 
Excel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP FunctionsExcel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP Functions
 
Intro to Excel Basics: Part I
Intro to Excel Basics: Part IIntro to Excel Basics: Part I
Intro to Excel Basics: Part I
 
A Quick Simple MS Excel Macro
A Quick Simple MS Excel MacroA Quick Simple MS Excel Macro
A Quick Simple MS Excel Macro
 

Viewers also liked

Excel DATEDIFF Function
Excel DATEDIFF FunctionExcel DATEDIFF Function
Excel DATEDIFF FunctionExcel
 
MS Excel Training(Basic)
MS Excel Training(Basic)MS Excel Training(Basic)
MS Excel Training(Basic)vikash kumar
 
Corporate Social Responsibility- Microsoft Corporation
Corporate Social Responsibility- Microsoft CorporationCorporate Social Responsibility- Microsoft Corporation
Corporate Social Responsibility- Microsoft CorporationNikita Jangid
 
Excel 2007 (formula)
Excel 2007 (formula)Excel 2007 (formula)
Excel 2007 (formula)osuchin
 
Functions and formulas of ms excel
Functions and formulas of ms excelFunctions and formulas of ms excel
Functions and formulas of ms excelmadhuparna bhowmik
 

Viewers also liked (6)

Excel DATEDIFF Function
Excel DATEDIFF FunctionExcel DATEDIFF Function
Excel DATEDIFF Function
 
Ms excel
Ms excelMs excel
Ms excel
 
MS Excel Training(Basic)
MS Excel Training(Basic)MS Excel Training(Basic)
MS Excel Training(Basic)
 
Corporate Social Responsibility- Microsoft Corporation
Corporate Social Responsibility- Microsoft CorporationCorporate Social Responsibility- Microsoft Corporation
Corporate Social Responsibility- Microsoft Corporation
 
Excel 2007 (formula)
Excel 2007 (formula)Excel 2007 (formula)
Excel 2007 (formula)
 
Functions and formulas of ms excel
Functions and formulas of ms excelFunctions and formulas of ms excel
Functions and formulas of ms excel
 

Similar to Introduction To Excel 2007 Macros

Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007Hasrudin Tazep
 
Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011gautamkumar048
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1rupeshkanu
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vbarjg_vijay
 
Creating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisherCreating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisherSamchi Fouzee
 
Top 20 Tips for Office 365 Productivity
Top 20 Tips for Office 365 ProductivityTop 20 Tips for Office 365 Productivity
Top 20 Tips for Office 365 ProductivityChristian Buckley
 
Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editorputiadetiara
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdfABHISHEK MALIK
 
Lab jam websphere message broker labs
Lab jam   websphere message broker labsLab jam   websphere message broker labs
Lab jam websphere message broker labsEng Binary
 

Similar to Introduction To Excel 2007 Macros (20)

Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007
 
VBA
VBAVBA
VBA
 
Excel 2007 Unit I
Excel 2007 Unit IExcel 2007 Unit I
Excel 2007 Unit I
 
Excel vba
Excel vbaExcel vba
Excel vba
 
Vbabook ed2
Vbabook ed2Vbabook ed2
Vbabook ed2
 
Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011
 
Notacd04
Notacd04Notacd04
Notacd04
 
Notacd04
Notacd04Notacd04
Notacd04
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vba
 
Vba 2 (students copy)
Vba 2 (students copy)Vba 2 (students copy)
Vba 2 (students copy)
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
Creating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisherCreating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisher
 
Excel chapter-7
Excel chapter-7Excel chapter-7
Excel chapter-7
 
Top 20 Tips for Office 365 Productivity
Top 20 Tips for Office 365 ProductivityTop 20 Tips for Office 365 Productivity
Top 20 Tips for Office 365 Productivity
 
UNIT I.pptx
UNIT I.pptxUNIT I.pptx
UNIT I.pptx
 
Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editor
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf
 
Lab jam websphere message broker labs
Lab jam   websphere message broker labsLab jam   websphere message broker labs
Lab jam websphere message broker labs
 
Excel 2007 Unit P
Excel 2007 Unit PExcel 2007 Unit P
Excel 2007 Unit P
 

More from Excel

Causes of Financial Model Errors
Causes of Financial Model ErrorsCauses of Financial Model Errors
Causes of Financial Model ErrorsExcel
 
Spreadsheet risks & mitigation
Spreadsheet risks & mitigationSpreadsheet risks & mitigation
Spreadsheet risks & mitigationExcel
 
Top 12 gestures if a person is lying
Top 12 gestures if a person is lyingTop 12 gestures if a person is lying
Top 12 gestures if a person is lyingExcel
 
Microsoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWMicrosoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWExcel
 
Excel DAYS360 Function
Excel DAYS360 FunctionExcel DAYS360 Function
Excel DAYS360 FunctionExcel
 
Microsoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesMicrosoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesExcel
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS FunctionExcel
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelExcel
 
Microsoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionMicrosoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionExcel
 

More from Excel (9)

Causes of Financial Model Errors
Causes of Financial Model ErrorsCauses of Financial Model Errors
Causes of Financial Model Errors
 
Spreadsheet risks & mitigation
Spreadsheet risks & mitigationSpreadsheet risks & mitigation
Spreadsheet risks & mitigation
 
Top 12 gestures if a person is lying
Top 12 gestures if a person is lyingTop 12 gestures if a person is lying
Top 12 gestures if a person is lying
 
Microsoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWMicrosoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOW
 
Excel DAYS360 Function
Excel DAYS360 FunctionExcel DAYS360 Function
Excel DAYS360 Function
 
Microsoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesMicrosoft Excel 2010 Sparklines
Microsoft Excel 2010 Sparklines
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS Function
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft Excel
 
Microsoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionMicrosoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP Function
 

Recently uploaded

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Introduction To Excel 2007 Macros

  • 1. Introduction to Microsoft Excel 2007 Macros
  • 2. Contents Introduction to Macro Introduction to Visual Basic for Application Recording a Macro Looking at the code of Recorded Macro
  • 3. Introduction to Visual Basic for Application Microsoft Excel 2007 in itself a tool which helps users to work with worksheets & workbooks with ease. This tool is one of the ultimate timesaver, but there are numerous events when you have to do repetitive tasks which are of a very little value but consume your precious time; yet engage you in a less productive activity, which Excel may do automatically. Microsoft Excel 2007 macro is the feature which eliminates or at-least minimize these events which take your precious time in repetitive tasks, and you will be able to capitalize this time in more productive & strategic activities.
  • 4. Introduction to Visual Basic for Application - cont… Apart from automating repetitive tasks Microsoft Excel Macros may also be used to create user interfaces User interfaces are screens where user can give inputs with ease also it enables input validations
  • 5. Introduction to Visual Basic for Application - cont… What is Visual Basic?Visual Basic is a language which is inherited from a very popular language BASIC. BASIC stands for Beginners All-purpose Symbolic Instruction Code. Visual Basic is called visual as you can do most of the program by click and go i.e. visually. It’s an event driven & object based language. What is Event Driven Language?When we say event driven it means that you can write triggers which will initiate on specific events for example when user opens any document or saves any document What is Object Based Language?Object based language is language in which we can use objects & their properties i.e. we can use the Worksheet object and its property SheetName when some one clicks on a button
  • 6. Introduction to Visual Basic for Application - cont… Visual Basic for ApplicationVisual Basic for Application is called VBA as it uses Visual Basic language and is capable of using application specific objects i.e. if we talk about VBA for Excel it can use Cell Object, Range Object, Worksheet Object, Workbook Object etc.
  • 7. Recording your first Macro Microsoft Excel 2007 provides you a very helpful option which enables you to record a macro and also modify and run afterwards Microsoft Excel 2007 don’t provide you the macro recording option by default for enabling macro recording at first you need to enable the Developer Tab, next slide defines step by step procedure to enable Developer Tab
  • 8. Enabling the Developer Tab Click on Office Button Click on Excel Options On Popular Tab checkShow Developer tab inRibbon
  • 9. Enabling the Developer Tab Once you are done with the process you will have the Developer Tab ready
  • 10. Recording your first Macro When you record macro Microsoft Excel 2007 provides you with 2 options either you can record a macro using Absolute References or Relative References If you go for Absolute References Excel’s behavior will be: You record a macro in Cell A1 type “Excel is Great” format Bold Cell B1 Whenever you play / run this macro Excel will always type “Excel is Great” in Cell A1 and format Bold Cell B1 no matter wherever your cursor is
  • 11. Recording your first Macro You can refer to following tab that you can click on Use Relative References which will enable you to record a macro in relative cells, as discussed whenever a relative reference macro is executed it will run in-place
  • 12. Recording your first Macro Click Developer Tab Click on Use Relative Reference Click on Record Macro 1 3 2
  • 13. Recording your first Macro As soon as you press record macro button the following screen will appear In the Macro name boxyou have to type the nameof macro In Shortcut key you can typeshort cut key which invokethe Macro Store macro (will discussedlater) You can also provide description of the macro
  • 14. Recording your first Macro As soon as you press OK in the previous dialog box two things happens first record macro button changesto Stop Recording Secondly Excel starts lookingfor your action and will recordthe same Please follow steps on the following slide to complete recording
  • 15. Recording your first Macro Click on Cell A1 type “Excel is Great” Select cells from A1:C1 click on Home Tab and click on Merge & Center Press Bold & Italics Now click on Developer Tab and click on Stop recording
  • 16. Playing your Macro You can execute the macro you just recorded by either clicking on the Macro button on the Developer Tab or by pressing Alt F8 , you can see the list of Recorded macros in the dialog box you can press Run buttonto execute the macro as soonas you press run you can seethat your recorded macro willexecute
  • 17. Behind the scenes To see what Excel did behind the scenes you can either click on Macros button on Developer Tab and select Edit or you can press Alt F11
  • 18. What it looks like This is what Excel did behind the scenes, it written the code for you. You can change the code if you want. You can either closethe window or pressAlt F11 again to goback to your Excelnormal screen
  • 19. Conclusion Macros are used to automate tasks or you can use macros to develop user interfaces Excel Macro use a language called VBA (Visual Basic for Applications), which is both Event Driven and Object Based The easiest way to look at macro is by using the Excel’s record Macro Feature You can even edit Excel’s recorded macro by yourself Soon we will publish a presentation which will guide you on how to write your own macro Please visit www.exceladvise.com For more on Excel Functions Please comment if you like it, or have any suggestions. 19 Photo Courtesy – www.freedigitalphotos.net