SlideShare une entreprise Scribd logo
1  sur  18
Introduction to Microsoft Excel 2007
Macros




                     Microsoft Excel 2007 Macro   1/4/2013   1
Content


   Introduction to Macro
   Introduction to Visual Basic for Application
   Recording a Macro
   Looking at the code of Recorded Macro




                                       Microsoft Excel 2007 Macro   1/4/2013   2
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.




                                       Microsoft Excel 2007 Macro   1/4/2013   3
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




                                       Microsoft Excel 2007 Macro   1/4/2013   4
Introduction to Visual Basic for Application
Cont.

   Visual Basic for Application
    Visual 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.




                                     Microsoft Excel 2007 Macro   1/30/2013   5
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




                                      Microsoft Excel 2007 Macro   1/4/2013   6
Enabling the Developer Tab


   Click on Office Button
   Click on Excel Options
   On Popular Tab check
    Show Developer tab in
    Ribbon




                             Microsoft Excel 2007 Macro   1/4/2013   7
Enabling the Developer Tab


   Once you are done with the process you will have the
    Developer Tab ready




                                      Microsoft Excel 2007 Macro   1/4/2013   8
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




                                        Microsoft Excel 2007 Macro   1/4/2013   9
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




                                      Microsoft Excel 2007 Macro   1/4/2013   10
Recording your first Macro


1.   Click Developer Tab
2.   Click on Use Relative Reference
3.   Click on Record Macro



                                                         1
       3

           2




                                       Microsoft Excel 2007 Macro   1/4/2013   11
Recording your first Macro


   As soon as you press record macro button the following
    screen will appear
   In the Macro name box you have to type the name of macro
   In Shortcut key you can type short cut key which invoke the
    Macro
   Store macro (will discussed later)
   You can also provide description of the macro




                                       Microsoft Excel 2007 Macro   1/4/2013   12
Recording your first Macro


   As soon as you press OK in the previous dialog box two things
    happens first record macro button changes to Stop
    Recording
   Secondly Excel starts looking for your action and will
    record the same
   Please follow steps on the following slide to complete
    recording




                                       Microsoft Excel 2007 Macro   1/4/2013   13
Recording your first Macro


1.   Click on Cell A1 type “Excel is Great”
2.   Select cells from A1:C1 click on Home Tab and click on Merge
     & Center
3.   Press Bold & Italics
4.   Now click on Developer Tab and click on Stop recording




                                     Microsoft Excel 2007 Macro   1/4/2013   14
Placing 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 button to execute the macro
    as soon as you press run you can see
    that your recorded macro will execute




                                      Microsoft Excel 2007 Macro   1/4/2013   15
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




                                       Microsoft Excel 2007 Macro   1/4/2013   16
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
    close the window or press Alt F11 again to go back to your
    Excel normal screen




                                       Microsoft Excel 2007 Macro   1/4/2013   17
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




                                      Microsoft Excel 2007 Macro   1/4/2013   18

Contenu connexe

Tendances (20)

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
 
MACROS excel
MACROS excelMACROS excel
MACROS excel
 
Excel macros tutorial
Excel macros tutorialExcel macros tutorial
Excel macros tutorial
 
Useful macros and functions for excel
Useful macros and functions for excelUseful macros and functions for excel
Useful macros and functions for excel
 
VBA - Macro For Ms.Excel
VBA - Macro For Ms.ExcelVBA - Macro For Ms.Excel
VBA - Macro For Ms.Excel
 
MS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project reportMS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project report
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
 
Vba 2 (students copy)
Vba 2 (students copy)Vba 2 (students copy)
Vba 2 (students copy)
 
Microsoft Excel 2013 Basics course
Microsoft Excel 2013 Basics courseMicrosoft Excel 2013 Basics course
Microsoft Excel 2013 Basics course
 
AutoCorrect - Excel 2013 Tutorial
AutoCorrect - Excel 2013 TutorialAutoCorrect - Excel 2013 Tutorial
AutoCorrect - Excel 2013 Tutorial
 
E learning excel vba programming lesson 2
E learning excel vba programming  lesson 2E learning excel vba programming  lesson 2
E learning excel vba programming lesson 2
 
Vba
Vba Vba
Vba
 
VBA
VBAVBA
VBA
 
Microsoft word basics2
Microsoft word basics2Microsoft word basics2
Microsoft word basics2
 
Notacd04
Notacd04Notacd04
Notacd04
 
Notacd04
Notacd04Notacd04
Notacd04
 
Adv excel® 2013
Adv excel® 2013Adv excel® 2013
Adv excel® 2013
 
Excel® 2013
Excel® 2013Excel® 2013
Excel® 2013
 
Vba introduction
Vba introductionVba introduction
Vba introduction
 
Excel vba
Excel vbaExcel vba
Excel vba
 

En vedette

Excel 2007 Pmt Function
Excel 2007 Pmt FunctionExcel 2007 Pmt Function
Excel 2007 Pmt Functionclupico
 
Using microsoft excel effectively
Using microsoft excel effectivelyUsing microsoft excel effectively
Using microsoft excel effectivelyjmcooper1622
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application Raghu nath
 
Effectively Using PowerPoint
Effectively Using PowerPointEffectively Using PowerPoint
Effectively Using PowerPointguestdf9f91
 
If and nested i fs
If and nested i fsIf and nested i fs
If and nested i fsPaulCPLD
 
Date & time functions in VB.NET
Date & time functions in VB.NETDate & time functions in VB.NET
Date & time functions in VB.NETA R
 
Notes how to work with variables, constants and do calculations
Notes how to work with variables, constants and do calculationsNotes how to work with variables, constants and do calculations
Notes how to work with variables, constants and do calculationsWilliam Olivier
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroductionOfun Emma
 
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
 
Demystifying Mergers and Acquisition
Demystifying Mergers and AcquisitionDemystifying Mergers and Acquisition
Demystifying Mergers and AcquisitionSiddhant Bahal
 
Using financial functions in ms excel
Using financial functions in ms excelUsing financial functions in ms excel
Using financial functions in ms excelPrakharLodha26
 
The Magic of Excel – Fromatting Like a Pro
The Magic of Excel – Fromatting Like a ProThe Magic of Excel – Fromatting Like a Pro
The Magic of Excel – Fromatting Like a ProAlliance To Save Energy
 
Quick and Easy Data Analysis with Excel
Quick and Easy Data Analysis with ExcelQuick and Easy Data Analysis with Excel
Quick and Easy Data Analysis with Excelaescurriculum
 
Business Intelligence (Av Arif Shafique)
Business Intelligence (Av Arif Shafique)Business Intelligence (Av Arif Shafique)
Business Intelligence (Av Arif Shafique)Microsoft Norge AS
 

En vedette (20)

Excel Macro Magic
Excel Macro MagicExcel Macro Magic
Excel Macro Magic
 
Excel 2007 Pmt Function
Excel 2007 Pmt FunctionExcel 2007 Pmt Function
Excel 2007 Pmt Function
 
Using microsoft excel effectively
Using microsoft excel effectivelyUsing microsoft excel effectively
Using microsoft excel effectively
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application
 
Excel y visual basic
Excel y visual basicExcel y visual basic
Excel y visual basic
 
Excel chapter-7
Excel chapter-7Excel chapter-7
Excel chapter-7
 
Excel 2007 Unit E
Excel 2007 Unit EExcel 2007 Unit E
Excel 2007 Unit E
 
Effectively Using PowerPoint
Effectively Using PowerPointEffectively Using PowerPoint
Effectively Using PowerPoint
 
If and nested i fs
If and nested i fsIf and nested i fs
If and nested i fs
 
Date & time functions in VB.NET
Date & time functions in VB.NETDate & time functions in VB.NET
Date & time functions in VB.NET
 
Notes how to work with variables, constants and do calculations
Notes how to work with variables, constants and do calculationsNotes how to work with variables, constants and do calculations
Notes how to work with variables, constants and do calculations
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
 
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
 
Demystifying Mergers and Acquisition
Demystifying Mergers and AcquisitionDemystifying Mergers and Acquisition
Demystifying Mergers and Acquisition
 
Sumif In Excel
Sumif In ExcelSumif In Excel
Sumif In Excel
 
Using financial functions in ms excel
Using financial functions in ms excelUsing financial functions in ms excel
Using financial functions in ms excel
 
The Magic of Excel – Fromatting Like a Pro
The Magic of Excel – Fromatting Like a ProThe Magic of Excel – Fromatting Like a Pro
The Magic of Excel – Fromatting Like a Pro
 
Quick and Easy Data Analysis with Excel
Quick and Easy Data Analysis with ExcelQuick and Easy Data Analysis with Excel
Quick and Easy Data Analysis with Excel
 
Excel data analysis niitsliin gorim
Excel data analysis niitsliin gorimExcel data analysis niitsliin gorim
Excel data analysis niitsliin gorim
 
Business Intelligence (Av Arif Shafique)
Business Intelligence (Av Arif Shafique)Business Intelligence (Av Arif Shafique)
Business Intelligence (Av Arif Shafique)
 

Similaire à Intro macros in Excel 2007

Microsoft excel 2007 programme for effective tertiary institution result grading
Microsoft excel 2007 programme for effective tertiary institution result gradingMicrosoft excel 2007 programme for effective tertiary institution result grading
Microsoft excel 2007 programme for effective tertiary institution result gradingAlexander Decker
 
Getting Started with Excel Macros – Day #1
Getting Started with Excel Macros – Day #1Getting Started with Excel Macros – Day #1
Getting Started with Excel Macros – Day #1Tariq Al-Basha
 
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
 
A practical tutorial to excel
A practical tutorial to excelA practical tutorial to excel
A practical tutorial to excelMunna India
 
Emmylet computer guide on excel
Emmylet computer guide on excelEmmylet computer guide on excel
Emmylet computer guide on excelOfun Emma
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1rupeshkanu
 
How to use microsoft excel
How to use microsoft excelHow to use microsoft excel
How to use microsoft excelgirum003
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdfABHISHEK MALIK
 
Excel - Group 1.pptx
Excel - Group 1.pptxExcel - Group 1.pptx
Excel - Group 1.pptxAlistairDatu1
 
Know How to Lock VBA Code in Microsoft Excel
Know How to Lock VBA Code in Microsoft Excel  Know How to Lock VBA Code in Microsoft Excel
Know How to Lock VBA Code in Microsoft Excel jason_clark03
 
Microsoft Office Products - Lesson.pptx
Microsoft Office Products - Lesson.pptxMicrosoft Office Products - Lesson.pptx
Microsoft Office Products - Lesson.pptxFroilanArboleda
 

Similaire à Intro macros in Excel 2007 (20)

Excel 2007 Unit I
Excel 2007 Unit IExcel 2007 Unit I
Excel 2007 Unit I
 
Microsoft excel 2007 programme for effective tertiary institution result grading
Microsoft excel 2007 programme for effective tertiary institution result gradingMicrosoft excel 2007 programme for effective tertiary institution result grading
Microsoft excel 2007 programme for effective tertiary institution result grading
 
Getting Started with Excel Macros – Day #1
Getting Started with Excel Macros – Day #1Getting Started with Excel Macros – Day #1
Getting Started with Excel Macros – Day #1
 
Word 2007 2
Word 2007 2Word 2007 2
Word 2007 2
 
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
 
Vbabook ed2
Vbabook ed2Vbabook ed2
Vbabook ed2
 
Microsoft Excel 2010 - Fast Course v2
Microsoft Excel 2010 - Fast Course v2Microsoft Excel 2010 - Fast Course v2
Microsoft Excel 2010 - Fast Course v2
 
Word2007p1
Word2007p1Word2007p1
Word2007p1
 
A practical tutorial to excel
A practical tutorial to excelA practical tutorial to excel
A practical tutorial to excel
 
Excel 2007 Unit P
Excel 2007 Unit PExcel 2007 Unit P
Excel 2007 Unit P
 
Emmylet computer guide on excel
Emmylet computer guide on excelEmmylet computer guide on excel
Emmylet computer guide on excel
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1
 
How to use microsoft excel
How to use microsoft excelHow to use microsoft excel
How to use microsoft excel
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf
 
Excel - Group 1.pptx
Excel - Group 1.pptxExcel - Group 1.pptx
Excel - Group 1.pptx
 
Excel 2013
Excel 2013Excel 2013
Excel 2013
 
MS word
MS wordMS word
MS word
 
Know How to Lock VBA Code in Microsoft Excel
Know How to Lock VBA Code in Microsoft Excel  Know How to Lock VBA Code in Microsoft Excel
Know How to Lock VBA Code in Microsoft Excel
 
Working with Excel Macros
Working with Excel MacrosWorking with Excel Macros
Working with Excel Macros
 
Microsoft Office Products - Lesson.pptx
Microsoft Office Products - Lesson.pptxMicrosoft Office Products - Lesson.pptx
Microsoft Office Products - Lesson.pptx
 

Dernier

ME 205- Chapter 6 - Pure Bending of Beams.pdf
ME 205- Chapter 6 - Pure Bending of Beams.pdfME 205- Chapter 6 - Pure Bending of Beams.pdf
ME 205- Chapter 6 - Pure Bending of Beams.pdfaae4149584
 
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样umasea
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书saphesg8
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of JobRemote DBA Services
 
办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书saphesg8
 
定制英国克兰菲尔德大学毕业证成绩单原版一比一
定制英国克兰菲尔德大学毕业证成绩单原版一比一定制英国克兰菲尔德大学毕业证成绩单原版一比一
定制英国克兰菲尔德大学毕业证成绩单原版一比一z zzz
 
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdf
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdfMost Inspirational Leaders Empowering the Educational Sector, 2024.pdf
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdfTheKnowledgeReview2
 
Kindergarten-DLL-MELC-Q3-Week 2 asf.docx
Kindergarten-DLL-MELC-Q3-Week 2 asf.docxKindergarten-DLL-MELC-Q3-Week 2 asf.docx
Kindergarten-DLL-MELC-Q3-Week 2 asf.docxLesterJayAquino
 
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一diploma 1
 
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...vinbld123
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter TerrorismNilendra Kumar
 
Graduate Trainee Officer Job in Bank Al Habib 2024.docx
Graduate Trainee Officer Job in Bank Al Habib 2024.docxGraduate Trainee Officer Job in Bank Al Habib 2024.docx
Graduate Trainee Officer Job in Bank Al Habib 2024.docxJobs Finder Hub
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...nitagrag2
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Riya Pathan
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证diploma001
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一Fs sss
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCRdollysharma2066
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfpadillaangelina0023
 
LESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdfLESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdf0471992maroyal
 

Dernier (20)

ME 205- Chapter 6 - Pure Bending of Beams.pdf
ME 205- Chapter 6 - Pure Bending of Beams.pdfME 205- Chapter 6 - Pure Bending of Beams.pdf
ME 205- Chapter 6 - Pure Bending of Beams.pdf
 
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
办理学位证(纽伦堡大学文凭证书)纽伦堡大学毕业证成绩单原版一模一样
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Job
 
办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书
 
定制英国克兰菲尔德大学毕业证成绩单原版一比一
定制英国克兰菲尔德大学毕业证成绩单原版一比一定制英国克兰菲尔德大学毕业证成绩单原版一比一
定制英国克兰菲尔德大学毕业证成绩单原版一比一
 
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdf
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdfMost Inspirational Leaders Empowering the Educational Sector, 2024.pdf
Most Inspirational Leaders Empowering the Educational Sector, 2024.pdf
 
Kindergarten-DLL-MELC-Q3-Week 2 asf.docx
Kindergarten-DLL-MELC-Q3-Week 2 asf.docxKindergarten-DLL-MELC-Q3-Week 2 asf.docx
Kindergarten-DLL-MELC-Q3-Week 2 asf.docx
 
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一
办理(Salford毕业证书)索尔福德大学毕业证成绩单原版一比一
 
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档
格里菲斯大学毕业证(Griffith毕业证)#文凭成绩单#真实留信学历认证永久存档
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter Terrorism
 
Graduate Trainee Officer Job in Bank Al Habib 2024.docx
Graduate Trainee Officer Job in Bank Al Habib 2024.docxGraduate Trainee Officer Job in Bank Al Habib 2024.docx
Graduate Trainee Officer Job in Bank Al Habib 2024.docx
 
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
Escorts Service Near Surya International Hotel, New Delhi |9873777170| Find H...
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdf
 
LESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdfLESSON O1_The Meaning and Importance of MICE.pdf
LESSON O1_The Meaning and Importance of MICE.pdf
 

Intro macros in Excel 2007

  • 1. Introduction to Microsoft Excel 2007 Macros Microsoft Excel 2007 Macro 1/4/2013 1
  • 2. Content  Introduction to Macro  Introduction to Visual Basic for Application  Recording a Macro  Looking at the code of Recorded Macro Microsoft Excel 2007 Macro 1/4/2013 2
  • 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. Microsoft Excel 2007 Macro 1/4/2013 3
  • 4. 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 Microsoft Excel 2007 Macro 1/4/2013 4
  • 5. Introduction to Visual Basic for Application Cont.  Visual Basic for Application Visual 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. Microsoft Excel 2007 Macro 1/30/2013 5
  • 6. 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 Microsoft Excel 2007 Macro 1/4/2013 6
  • 7. Enabling the Developer Tab  Click on Office Button  Click on Excel Options  On Popular Tab check Show Developer tab in Ribbon Microsoft Excel 2007 Macro 1/4/2013 7
  • 8. Enabling the Developer Tab  Once you are done with the process you will have the Developer Tab ready Microsoft Excel 2007 Macro 1/4/2013 8
  • 9. 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 Microsoft Excel 2007 Macro 1/4/2013 9
  • 10. 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 Microsoft Excel 2007 Macro 1/4/2013 10
  • 11. Recording your first Macro 1. Click Developer Tab 2. Click on Use Relative Reference 3. Click on Record Macro 1 3 2 Microsoft Excel 2007 Macro 1/4/2013 11
  • 12. Recording your first Macro  As soon as you press record macro button the following screen will appear  In the Macro name box you have to type the name of macro  In Shortcut key you can type short cut key which invoke the Macro  Store macro (will discussed later)  You can also provide description of the macro Microsoft Excel 2007 Macro 1/4/2013 12
  • 13. Recording your first Macro  As soon as you press OK in the previous dialog box two things happens first record macro button changes to Stop Recording  Secondly Excel starts looking for your action and will record the same  Please follow steps on the following slide to complete recording Microsoft Excel 2007 Macro 1/4/2013 13
  • 14. Recording your first Macro 1. Click on Cell A1 type “Excel is Great” 2. Select cells from A1:C1 click on Home Tab and click on Merge & Center 3. Press Bold & Italics 4. Now click on Developer Tab and click on Stop recording Microsoft Excel 2007 Macro 1/4/2013 14
  • 15. Placing 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 button to execute the macro as soon as you press run you can see that your recorded macro will execute Microsoft Excel 2007 Macro 1/4/2013 15
  • 16. 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 Microsoft Excel 2007 Macro 1/4/2013 16
  • 17. 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 close the window or press Alt F11 again to go back to your Excel normal screen Microsoft Excel 2007 Macro 1/4/2013 17
  • 18. 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 Microsoft Excel 2007 Macro 1/4/2013 18