SlideShare a Scribd company logo
1 of 5
Excel VBA -   4th   Session
                    End Sub
                              Sub macro1()
Declaring Variables
  A Variable is used to store temporary information that is used for
  execution within the Procedure, Module or Workbook. Before
  we go into some detail of Variables, there are a few important
  rules that you must know about.
• A Variable name must Start with a letter and not a number.
  Numbers can be included within the name, but not as the first
  character.
• A Variable name can be no longer than 255 characters.
• A Variable name cannot be the same as any one of Excel's key
  words. In other words you cannot name a Variable with such
  names as Sheet, Worksheet etc.
• All Variables must consist of one continuous string of characters
  only. You can separate words by either capitalising the first letter
  of each word, or by using the underscore characters if you prefer.
List of Data Types
Byte Data Type
  Byte is VBA's smallest numeric data type
  and holds a (natural) numeric value from 0
  to 255. In this data type only positive
  numbers to be used. Otherwise VBA will
  return with an error.
Example for Byte Data Type :
Sub atz()
Dim Value As Byte

Value = 246
End Sub

        We are going discuss more about Byte and cbyte() in future lessons
AmeetZ Academy

For Complete PPT, visit www.ameetz.com
     Or write to rama@ameetz.com

More Related Content

What's hot

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 2Vijay Perepa
 
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
 
VBA Classes from Chandoo.org - Course Brochure
VBA Classes from Chandoo.org - Course BrochureVBA Classes from Chandoo.org - Course Brochure
VBA Classes from Chandoo.org - Course Brochurer1c1
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application Raghu nath
 
Advance MS Excel
Advance MS ExcelAdvance MS Excel
Advance MS Excelacute23
 
AVB201.2 Microsoft Access VBA Module 2
AVB201.2 Microsoft Access VBA Module 2AVB201.2 Microsoft Access VBA Module 2
AVB201.2 Microsoft Access VBA Module 2Dan D'Urso
 
How to apply a formula and macro in excel......by irfan afzal
How to apply a formula and macro in excel......by irfan afzalHow to apply a formula and macro in excel......by irfan afzal
How to apply a formula and macro in excel......by irfan afzal1995786
 
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 1guest38bf
 
Transforming Power Point Show with VBA
Transforming Power Point Show with VBATransforming Power Point Show with VBA
Transforming Power Point Show with VBADCPS
 

What's hot (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
 
Vba introduction
Vba introductionVba introduction
Vba introduction
 
Vba part 1
Vba part 1Vba part 1
Vba 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
 
Using Vba Excel
Using Vba ExcelUsing Vba Excel
Using Vba Excel
 
VBA Classes from Chandoo.org - Course Brochure
VBA Classes from Chandoo.org - Course BrochureVBA Classes from Chandoo.org - Course Brochure
VBA Classes from Chandoo.org - Course Brochure
 
Vba
Vba Vba
Vba
 
Excel vba
Excel vbaExcel vba
Excel vba
 
VBA
VBAVBA
VBA
 
Vba Class Level 3
Vba Class Level 3Vba Class Level 3
Vba Class Level 3
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application
 
Advance MS Excel
Advance MS ExcelAdvance MS Excel
Advance MS Excel
 
AVB201.2 Microsoft Access VBA Module 2
AVB201.2 Microsoft Access VBA Module 2AVB201.2 Microsoft Access VBA Module 2
AVB201.2 Microsoft Access VBA Module 2
 
How to apply a formula and macro in excel......by irfan afzal
How to apply a formula and macro in excel......by irfan afzalHow to apply a formula and macro in excel......by irfan afzal
How to apply a formula and macro in excel......by irfan afzal
 
MACROS excel
MACROS excelMACROS excel
MACROS excel
 
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
 
Transforming Power Point Show with VBA
Transforming Power Point Show with VBATransforming Power Point Show with VBA
Transforming Power Point Show with VBA
 
Excel-VBA
Excel-VBAExcel-VBA
Excel-VBA
 
Vba Excel Level 2
Vba Excel Level 2Vba Excel Level 2
Vba Excel Level 2
 
07 java variables
07   java variables07   java variables
07 java variables
 

Similar to E learning excel vba programming lesson 4

200 Mega eBook Collection- http://bit.ly/3WEZuYJ
200 Mega eBook Collection- http://bit.ly/3WEZuYJ200 Mega eBook Collection- http://bit.ly/3WEZuYJ
200 Mega eBook Collection- http://bit.ly/3WEZuYJDannySingh23
 
has any rows using Count(). This way, you avoid the CS8604 error related to p...
has any rows using Count(). This way, you avoid the CS8604 error related to p...has any rows using Count(). This way, you avoid the CS8604 error related to p...
has any rows using Count(). This way, you avoid the CS8604 error related to p...Anwar Patel
 
Literals,variables,datatype in C#
Literals,variables,datatype in C#Literals,variables,datatype in C#
Literals,variables,datatype in C#Prasanna Kumar SM
 

Similar to E learning excel vba programming lesson 4 (6)

200 Mega eBook Collection- http://bit.ly/3WEZuYJ
200 Mega eBook Collection- http://bit.ly/3WEZuYJ200 Mega eBook Collection- http://bit.ly/3WEZuYJ
200 Mega eBook Collection- http://bit.ly/3WEZuYJ
 
Ma3696 Lecture 1
Ma3696 Lecture 1Ma3696 Lecture 1
Ma3696 Lecture 1
 
has any rows using Count(). This way, you avoid the CS8604 error related to p...
has any rows using Count(). This way, you avoid the CS8604 error related to p...has any rows using Count(). This way, you avoid the CS8604 error related to p...
has any rows using Count(). This way, you avoid the CS8604 error related to p...
 
Literals,variables,datatype in C#
Literals,variables,datatype in C#Literals,variables,datatype in C#
Literals,variables,datatype in C#
 
Basic
BasicBasic
Basic
 
VBA
VBAVBA
VBA
 

More from Vijay Perepa

Access essential training framework
Access essential training   frameworkAccess essential training   framework
Access essential training frameworkVijay Perepa
 
Add picture to comment
Add picture to commentAdd picture to comment
Add picture to commentVijay Perepa
 
Excel short cut series function keys
Excel short cut series   function keysExcel short cut series   function keys
Excel short cut series function keysVijay Perepa
 
PowerPoint Info-Graphics
PowerPoint Info-GraphicsPowerPoint Info-Graphics
PowerPoint Info-GraphicsVijay Perepa
 
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 themVijay Perepa
 
Pivot table essential learning 1
Pivot table   essential learning 1Pivot table   essential learning 1
Pivot table essential learning 1Vijay Perepa
 
Pivot table essential learning 2
Pivot table   essential learning 2Pivot table   essential learning 2
Pivot table essential learning 2Vijay Perepa
 
Modeling in microsoft excel
Modeling in microsoft excelModeling in microsoft excel
Modeling in microsoft excelVijay Perepa
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error valuesVijay Perepa
 
Excel training commands not in ribbon
Excel training   commands not in ribbonExcel training   commands not in ribbon
Excel training commands not in ribbonVijay Perepa
 
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 5Vijay Perepa
 
Power point short cut keys
Power point short cut keysPower point short cut keys
Power point short cut keysVijay Perepa
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error valuesVijay 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 academyVijay Perepa
 
Excel information formulae ameet z academy
Excel information formulae   ameet z academyExcel information formulae   ameet z academy
Excel information formulae ameet z academyVijay Perepa
 
Excel text formulae ameet z academy
Excel text formulae   ameet z academyExcel text formulae   ameet z academy
Excel text formulae ameet z academyVijay Perepa
 
E-Learning from Ameetz (ISERROR formula)
E-Learning from Ameetz (ISERROR formula)E-Learning from Ameetz (ISERROR formula)
E-Learning from Ameetz (ISERROR formula)Vijay Perepa
 
E learning excel short cut keys
E learning excel short cut keysE learning excel short cut keys
E learning excel short cut keysVijay Perepa
 

More from 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
 
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
 
Sumif () ppt
Sumif () pptSumif () ppt
Sumif () ppt
 

Recently uploaded

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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 . pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

E learning excel vba programming lesson 4

  • 1. Excel VBA - 4th Session End Sub Sub macro1()
  • 2. Declaring Variables A Variable is used to store temporary information that is used for execution within the Procedure, Module or Workbook. Before we go into some detail of Variables, there are a few important rules that you must know about. • A Variable name must Start with a letter and not a number. Numbers can be included within the name, but not as the first character. • A Variable name can be no longer than 255 characters. • A Variable name cannot be the same as any one of Excel's key words. In other words you cannot name a Variable with such names as Sheet, Worksheet etc. • All Variables must consist of one continuous string of characters only. You can separate words by either capitalising the first letter of each word, or by using the underscore characters if you prefer.
  • 3. List of Data Types
  • 4. Byte Data Type Byte is VBA's smallest numeric data type and holds a (natural) numeric value from 0 to 255. In this data type only positive numbers to be used. Otherwise VBA will return with an error. Example for Byte Data Type : Sub atz() Dim Value As Byte Value = 246 End Sub We are going discuss more about Byte and cbyte() in future lessons
  • 5. AmeetZ Academy For Complete PPT, visit www.ameetz.com Or write to rama@ameetz.com