SlideShare uma empresa Scribd logo
1 de 13
Ameetz.com What is VBA? Visual Basic for Applications (VBA) is an extensible programming language that is made up of a core set of commands and extended on a per-application basis to be able to work directly with objects in that application. This means that VBA for Excel knows about things like workbooks, worksheets, cells and charts and more;  VBA can probably be best described as an object-based (but not a true object oriented) language that is event driven. Let’s look at the event driven side of it first.
Ameetz.com EVENT DRIVEN LANGUAGE  Event driven means that nothing happens until something happens. In VBA, no code executes except in response to some event taking place (or at the command of the code once it is started by some event). An event can be any one of many things. Opening an Excel workbook creates, or  triggers, the Open event, closing it triggers the Before Close event. OBJECT-BASED LANGUAGE  Object based means that when referring to the components of the application, things like workbooks, worksheets, cells, charts, etc. are ‘objects’.
Ameetz.com An object has certain attributes. Just a a person has attributes like height, weight, eye and hair color, the objects in Excel have attributes (Properties) such as value, height, width, color and more. Additionally, objects can do things or have things done to them – these actions are known as Methods. For example, a workbook can be opened or closed; a cell can have its shading altered, a worksheet can be deleted.
Ameetz.com The Excel VBA IDE  (Integrated Development Environment)
GETTING TO THE VBA IDE  Your first question may be “How the heck did you get there!?” The quickest way to open the VBA IDE (which I’ll simply call the VBE for Visual Basic Editor for the rest of this document), is to press  [Alt]+[F11] while in the main/normal Excel window. You can also get there from the normal Excel menu via Tools | Macro | Visual Basic Editor:
The VBE menu and normal icon toolbar.  The project Window , If not visible ctrl+R to bring to view The Code window – may be empty, or may be shared for use to display other things such as the Object Browser.  The Properties window – displays and allows editing of the properties of the currently active object.  The Immediate window – you can type in commands, set values, examine values and Debug.Print results show up in this window.
Option Explicit  is a directive to the compiler that says that all user defined constants and variables must be declared before actually using them in the code. The up side of using Option Explicit is that errors in your code due to typographic errors or reuse of a variable as the wrong type are greatly reduced and when it does happen, the problems are more easily identified
To make sure that you don’t forget to always use  Option Explicit,  you can have a ‘permanent’ setting and affects all projects you create in any workbook after making the setting.  Start by selecting [Tools] | Options from the VBE menu toolbar:
This is the dialog that appears once you use [Tools] | Options from the VBE menu toolbar.  Check the “Require Variable Declaration” box to set up the VBE to always place the  Option Explicit  statement at the beginning of all new code modules in the future.
Code Modules ,[object Object],[object Object],[object Object],[object Object],General Purpose Code Modules These are code modules you’ll bring into existence and can contain code to do almost anything of a ‘general purpose’ nature.  code to respond to custom menus you might develop, user defined functions (UDF) that you develop to perform actions and calculations by way of using the name of the UDF in a worksheet formula just like a built-in Excel worksheet function.  Macros you record are placed into general purpose modules. Recording macros during different sessions with the workbook results in numerous modules that may contain as few as a single procedure (macro) in it. This results in being quite wasteful of resources. All macros recorded during a single session are typically placed into a single module.
WORKBOOK CODE MODULES  There is one and only one code module per workbook that is associated with Workbook Event handling. At the technical level, this module, along with the worksheet event handling modules are Class Modules.
WORKSHEET CODE MODULES  There is one and only one code module per worksheet that is associated with  Worksheet Event handling.  However, each sheet has its very own code module that is separate and distinct from all of the others even though they may all have event handlers for a given event for those worksheets. At the technical level, this module, just like the event handling module for the workbook are Class Modules
End of 1 st  Lesson Next Session  - Procedures – Function and Sub

Mais conteúdo relacionado

Mais procurados

Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
sanket1996
 
Using the IF Function in Excel
Using the IF Function in ExcelUsing the IF Function in Excel
Using the IF Function in Excel
Casey Robertson
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
Salim M
 

Mais procurados (20)

Online Advance Excel & VBA Training in India
 Online Advance Excel & VBA Training in India Online Advance Excel & VBA Training in India
Online Advance Excel & VBA Training in India
 
VBA - Macro For Ms.Excel
VBA - Macro For Ms.ExcelVBA - Macro For Ms.Excel
VBA - Macro For Ms.Excel
 
Vba
Vba Vba
Vba
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Excel Macro Magic
Excel Macro MagicExcel Macro Magic
Excel Macro Magic
 
Excel VBA programming basics
Excel VBA programming basicsExcel VBA programming basics
Excel VBA programming basics
 
Microsoft Excel Tutorial
Microsoft Excel TutorialMicrosoft Excel Tutorial
Microsoft Excel Tutorial
 
Learn Excel Macro
Learn Excel Macro  Learn Excel Macro
Learn Excel Macro
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introduction
 
Getting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosGetting started with Microsoft Excel Macros
Getting started with Microsoft Excel Macros
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Using the IF Function in Excel
Using the IF Function in ExcelUsing the IF Function in Excel
Using the IF Function in Excel
 
A Quick Simple MS Excel Macro
A Quick Simple MS Excel MacroA Quick Simple MS Excel Macro
A Quick Simple MS Excel Macro
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
 
Basic Ms excel
Basic Ms excelBasic Ms excel
Basic Ms excel
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
visual basic programming
visual basic programmingvisual basic programming
visual basic programming
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
MS Excel Basics
 MS Excel Basics MS Excel Basics
MS Excel Basics
 

Destaque

Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application
Raghu nath
 
Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10
Niit Care
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
Ofun Emma
 
Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007
Hasrudin Tazep
 
The visual elements of an image (english version)
The visual elements of an image (english version)The visual elements of an image (english version)
The visual elements of an image (english version)
LARIBERAPLASTICA
 

Destaque (20)

Excel ch10
Excel ch10Excel ch10
Excel ch10
 
Introduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosIntroduction To Excel 2007 Macros
Introduction To Excel 2007 Macros
 
eSocial - Plano de Voo Vilesoft
eSocial - Plano de Voo VilesofteSocial - Plano de Voo Vilesoft
eSocial - Plano de Voo Vilesoft
 
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
 
Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10
 
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
 
Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007
 
The visual elements of an image (english version)
The visual elements of an image (english version)The visual elements of an image (english version)
The visual elements of an image (english version)
 
Microsoft visual basic 6
Microsoft visual basic 6Microsoft visual basic 6
Microsoft visual basic 6
 
Google Analytics Overview
Google Analytics OverviewGoogle Analytics Overview
Google Analytics Overview
 
The Best Source Code VB
The Best Source Code VBThe Best Source Code VB
The Best Source Code VB
 
Up and running with VBA in Excel Certificate of Completion
Up and running with VBA in Excel Certificate of CompletionUp and running with VBA in Excel Certificate of Completion
Up and running with VBA in Excel Certificate of Completion
 
Vba Class Level 1
Vba Class Level 1Vba Class Level 1
Vba Class Level 1
 
Belajar macro excel 2007
Belajar macro excel 2007Belajar macro excel 2007
Belajar macro excel 2007
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Introduction To Predictive Analytics Part I
Introduction To Predictive Analytics   Part IIntroduction To Predictive Analytics   Part I
Introduction To Predictive Analytics Part I
 
Google Analytics
Google AnalyticsGoogle Analytics
Google Analytics
 

Semelhante a E learning excel vba programming lesson 1

Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vba
rjg_vijay
 
Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-step
namtranvanpt
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
elliando dias
 
Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)
Mark Vincent Cantero
 

Semelhante a E learning excel vba programming lesson 1 (20)

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
 
Unit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdfUnit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdf
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
Automating SolidWorks with Excel
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
Vb lecture
Vb lectureVb lecture
Vb lecture
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vba
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1AVB201.1 MS Access VBA Module 1
AVB201.1 MS Access VBA Module 1
 
Financial modeling sameh aljabli lecture 6
Financial modeling   sameh aljabli   lecture 6Financial modeling   sameh aljabli   lecture 6
Financial modeling sameh aljabli lecture 6
 
UNIT I.pptx
UNIT I.pptxUNIT I.pptx
UNIT I.pptx
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic concepts
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-step
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
VBA
VBAVBA
VBA
 
Bm0025 visual basic
Bm0025   visual basicBm0025   visual basic
Bm0025 visual basic
 
Vbabook ed2
Vbabook ed2Vbabook ed2
Vbabook ed2
 
Ch02 bronson
Ch02 bronsonCh02 bronson
Ch02 bronson
 
Sww 2008 Automating Your Designs Excel, Vba And Beyond
Sww 2008   Automating Your Designs   Excel, Vba And BeyondSww 2008   Automating Your Designs   Excel, Vba And Beyond
Sww 2008 Automating Your Designs Excel, Vba And Beyond
 
Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)
 

Mais de Vijay Perepa

Pivot table essential learning 1
Pivot table   essential learning 1Pivot table   essential learning 1
Pivot table essential learning 1
Vijay Perepa
 
Modeling in microsoft excel
Modeling in microsoft excelModeling in microsoft excel
Modeling in microsoft excel
Vijay Perepa
 
Excel training commands not in ribbon
Excel training   commands not in ribbonExcel training   commands not in ribbon
Excel training commands not in ribbon
Vijay Perepa
 
Power point short cut keys
Power point short cut keysPower point short cut keys
Power point short cut keys
Vijay Perepa
 
Excel information formulae par ii ameet z academy
Excel information formulae par ii  ameet z academyExcel information formulae par ii  ameet z academy
Excel information formulae par ii ameet z academy
Vijay Perepa
 

Mais de Vijay Perepa (20)

Access essential training framework
Access essential training   frameworkAccess essential training   framework
Access essential training framework
 
Add picture to comment
Add picture to commentAdd picture to comment
Add picture to comment
 
Excel short cut series function keys
Excel short cut series   function keysExcel short cut series   function keys
Excel short cut series function keys
 
PowerPoint Info-Graphics
PowerPoint Info-GraphicsPowerPoint Info-Graphics
PowerPoint Info-Graphics
 
Types of charts in Excel and How to use them
Types of charts in Excel and How to use themTypes of charts in Excel and How to use them
Types of charts in Excel and How to use them
 
Pivot table essential learning 1
Pivot table   essential learning 1Pivot table   essential learning 1
Pivot table essential learning 1
 
Pivot table essential learning 2
Pivot table   essential learning 2Pivot table   essential learning 2
Pivot table essential learning 2
 
Modeling in microsoft excel
Modeling in microsoft excelModeling in microsoft excel
Modeling in microsoft excel
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error values
 
Excel training commands not in ribbon
Excel training   commands not in ribbonExcel training   commands not in ribbon
Excel training commands not in ribbon
 
E learning excel vba programming lesson 5
E learning excel vba programming  lesson 5E learning excel vba programming  lesson 5
E learning excel vba programming lesson 5
 
E learning excel vba programming lesson 4
E learning excel vba programming  lesson 4E learning excel vba programming  lesson 4
E learning excel vba programming lesson 4
 
Pivot table
Pivot tablePivot table
Pivot table
 
Power point short cut keys
Power point short cut keysPower point short cut keys
Power point short cut keys
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error values
 
Excel information formulae par ii ameet z academy
Excel information formulae par ii  ameet z academyExcel information formulae par ii  ameet z academy
Excel information formulae par ii ameet z academy
 
Excel information formulae ameet z academy
Excel information formulae   ameet z academyExcel information formulae   ameet z academy
Excel information formulae ameet z academy
 
Excel text formulae ameet z academy
Excel text formulae   ameet z academyExcel text formulae   ameet z academy
Excel text formulae ameet z academy
 
E-Learning from Ameetz (ISERROR formula)
E-Learning from Ameetz (ISERROR formula)E-Learning from Ameetz (ISERROR formula)
E-Learning from Ameetz (ISERROR formula)
 
E learning excel short cut keys
E learning excel short cut keysE learning excel short cut keys
E learning excel short cut keys
 

Último

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
 
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 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

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
 
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
 
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
 
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...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
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
 
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...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.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
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 

E learning excel vba programming lesson 1

  • 1. Ameetz.com What is VBA? Visual Basic for Applications (VBA) is an extensible programming language that is made up of a core set of commands and extended on a per-application basis to be able to work directly with objects in that application. This means that VBA for Excel knows about things like workbooks, worksheets, cells and charts and more; VBA can probably be best described as an object-based (but not a true object oriented) language that is event driven. Let’s look at the event driven side of it first.
  • 2. Ameetz.com EVENT DRIVEN LANGUAGE Event driven means that nothing happens until something happens. In VBA, no code executes except in response to some event taking place (or at the command of the code once it is started by some event). An event can be any one of many things. Opening an Excel workbook creates, or triggers, the Open event, closing it triggers the Before Close event. OBJECT-BASED LANGUAGE Object based means that when referring to the components of the application, things like workbooks, worksheets, cells, charts, etc. are ‘objects’.
  • 3. Ameetz.com An object has certain attributes. Just a a person has attributes like height, weight, eye and hair color, the objects in Excel have attributes (Properties) such as value, height, width, color and more. Additionally, objects can do things or have things done to them – these actions are known as Methods. For example, a workbook can be opened or closed; a cell can have its shading altered, a worksheet can be deleted.
  • 4. Ameetz.com The Excel VBA IDE (Integrated Development Environment)
  • 5. GETTING TO THE VBA IDE Your first question may be “How the heck did you get there!?” The quickest way to open the VBA IDE (which I’ll simply call the VBE for Visual Basic Editor for the rest of this document), is to press [Alt]+[F11] while in the main/normal Excel window. You can also get there from the normal Excel menu via Tools | Macro | Visual Basic Editor:
  • 6. The VBE menu and normal icon toolbar. The project Window , If not visible ctrl+R to bring to view The Code window – may be empty, or may be shared for use to display other things such as the Object Browser. The Properties window – displays and allows editing of the properties of the currently active object. The Immediate window – you can type in commands, set values, examine values and Debug.Print results show up in this window.
  • 7. Option Explicit is a directive to the compiler that says that all user defined constants and variables must be declared before actually using them in the code. The up side of using Option Explicit is that errors in your code due to typographic errors or reuse of a variable as the wrong type are greatly reduced and when it does happen, the problems are more easily identified
  • 8. To make sure that you don’t forget to always use Option Explicit, you can have a ‘permanent’ setting and affects all projects you create in any workbook after making the setting. Start by selecting [Tools] | Options from the VBE menu toolbar:
  • 9. This is the dialog that appears once you use [Tools] | Options from the VBE menu toolbar. Check the “Require Variable Declaration” box to set up the VBE to always place the Option Explicit statement at the beginning of all new code modules in the future.
  • 10.
  • 11. WORKBOOK CODE MODULES There is one and only one code module per workbook that is associated with Workbook Event handling. At the technical level, this module, along with the worksheet event handling modules are Class Modules.
  • 12. WORKSHEET CODE MODULES There is one and only one code module per worksheet that is associated with Worksheet Event handling. However, each sheet has its very own code module that is separate and distinct from all of the others even though they may all have event handlers for a given event for those worksheets. At the technical level, this module, just like the event handling module for the workbook are Class Modules
  • 13. End of 1 st Lesson Next Session - Procedures – Function and Sub