SlideShare uma empresa Scribd logo
1 de 9
Lesson 1
We all imagine that doing Programming in
Excel, is to add new things to Excel and so it
is some thing not easy to learn.

Interestingly programming Excel is not really
about adding new features as much as it is
about combining existing features to solve
specific problems.
Programming in Excel is to make some task easier
and more reliable.

Through Programming, you are asking Excel to do
certain tasks and Excel Follows that.

Programming languages make things easier
because they are great at performing repetitive
operations and following a logical path without
getting tired or bored. They make things more
reliable because they follow your directions and
never, ever get creative.
The best way to learn Macros and break the
ice is by recording code.

Thru this you can learn about Excel objects,
properties, and methods. We will discuss the
same in detail, in coming slides.

 When we record a macro, we can see that, it
is rather writing a code on its own ( a visual
basic code)
Let us record a macro with a regular activity
                Which we repeatedly use on our daily routine.

                For Example, with a particular Data, I wanted to
                change the format and convert that into a Graph.

                Choose Tools - > Macros -> Record New Macro
                A dialog box appears as shown here
                ( Record Macro)

Select Data   Format Option               Select Format
Select Data                 Insert Charts               Simple Graph Appears




              While Recording Macro, “Record Macro” Button, becomes a
              small Blue Square. Once your Recording is over, you need to
              stop recording as shown below
The task described in earlier slide ,was recorded in the
below Macro
   Sub Macro1()
   '
   ' macro_1 Macro
   '

   '
     Range("A2:B6").Select
     ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$2:$B$6"), ,
     xlYes).Name = _
        "Table2"
     Range("Table2[#All]").Select
     ActiveSheet.ListObjects("Table2").TableStyle = "TableStyleMedium2"
     ActiveSheet.Shapes.AddChart.Select
     ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$2:$B$6")
     ActiveChart.ChartType = xlColumnClustered
   End Sub
In the next Lesson –



1.   Reading and Understanding Recorded Code
2.   Macros and Security
3.   Classes , Modules and Procedures

Mais conteúdo relacionado

Destaque

Pemrograman makro vba excel 2007
Pemrograman makro vba excel 2007Pemrograman makro vba excel 2007
Pemrograman makro vba excel 2007
tm_prasetyo
 

Destaque (17)

Pemrograman makro vba excel 2007
Pemrograman makro vba excel 2007Pemrograman makro vba excel 2007
Pemrograman makro vba excel 2007
 
Vba excel
Vba excelVba excel
Vba excel
 
Summer training introduction to matlab
Summer training  introduction to matlabSummer training  introduction to matlab
Summer training introduction to matlab
 
Vba part 1
Vba part 1Vba part 1
Vba part 1
 
新觀念的VB6教本ch12
新觀念的VB6教本ch12新觀念的VB6教本ch12
新觀念的VB6教本ch12
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3
 
新觀念的VB6教本ch11
新觀念的VB6教本ch11新觀念的VB6教本ch11
新觀念的VB6教本ch11
 
新觀念的VB6教本ch13
新觀念的VB6教本ch13新觀念的VB6教本ch13
新觀念的VB6教本ch13
 
新觀念的VB6教本ch04
新觀念的VB6教本ch04新觀念的VB6教本ch04
新觀念的VB6教本ch04
 
AutoCAD Training Syllabus
AutoCAD Training SyllabusAutoCAD Training Syllabus
AutoCAD Training Syllabus
 
Modul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap okModul kuliah-vba-lengkap ok
Modul kuliah-vba-lengkap ok
 
Management productivity tools1
Management productivity tools1Management productivity tools1
Management productivity tools1
 
新觀念的VB6教本ch03
新觀念的VB6教本ch03新觀念的VB6教本ch03
新觀念的VB6教本ch03
 
新觀念的VB6教本ch02
新觀念的VB6教本ch02新觀念的VB6教本ch02
新觀念的VB6教本ch02
 
新觀念的VB6教本ch08
新觀念的VB6教本ch08新觀念的VB6教本ch08
新觀念的VB6教本ch08
 
Excel VBA
Excel VBAExcel VBA
Excel VBA
 
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
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Excel VBA - Lesson 1 - Basics

  • 2. We all imagine that doing Programming in Excel, is to add new things to Excel and so it is some thing not easy to learn. Interestingly programming Excel is not really about adding new features as much as it is about combining existing features to solve specific problems.
  • 3. Programming in Excel is to make some task easier and more reliable. Through Programming, you are asking Excel to do certain tasks and Excel Follows that. Programming languages make things easier because they are great at performing repetitive operations and following a logical path without getting tired or bored. They make things more reliable because they follow your directions and never, ever get creative.
  • 4. The best way to learn Macros and break the ice is by recording code. Thru this you can learn about Excel objects, properties, and methods. We will discuss the same in detail, in coming slides. When we record a macro, we can see that, it is rather writing a code on its own ( a visual basic code)
  • 5.
  • 6. Let us record a macro with a regular activity Which we repeatedly use on our daily routine. For Example, with a particular Data, I wanted to change the format and convert that into a Graph. Choose Tools - > Macros -> Record New Macro A dialog box appears as shown here ( Record Macro) Select Data Format Option Select Format
  • 7. Select Data Insert Charts Simple Graph Appears While Recording Macro, “Record Macro” Button, becomes a small Blue Square. Once your Recording is over, you need to stop recording as shown below
  • 8. The task described in earlier slide ,was recorded in the below Macro Sub Macro1() ' ' macro_1 Macro ' ' Range("A2:B6").Select ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$2:$B$6"), , xlYes).Name = _ "Table2" Range("Table2[#All]").Select ActiveSheet.ListObjects("Table2").TableStyle = "TableStyleMedium2" ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$2:$B$6") ActiveChart.ChartType = xlColumnClustered End Sub
  • 9. In the next Lesson – 1. Reading and Understanding Recorded Code 2. Macros and Security 3. Classes , Modules and Procedures