SlideShare uma empresa Scribd logo
1 de 75
 
HORIZONTAL SCROLL BAR
CODES
SHOW/HIDE/CHANGE IMAGE
CODES
ADD/REMOVE/CLEAR ITEMS
CODES
CODES
PRELOADING ITEMS
CODES
LIST BOX TO TEXT BOX
CODES
DOUBLE-CLICK TO REMOVE
CODES
CLICK THE REMOVE BUTTON TO DELETE THE ITEMS
CODES
DOUBLE-CLICK TO TRANSFER FROM LIST BOX TO ANOTHER LIST BOX
CODES
DISPLAYING THE ITEMS IN THE LIST BOX AND SHOWING THE DESCRIPTION IN A TEXT BOX
CODES
CODES
THE USE OF COMBO BOX
CODES
CODES
COMBO BOX TO TEXT BOX
CODES
COMBO BOX TO LIST BOX
CODES
USE OF VARIABLES
CODES
CODES
USE OF CONSTANTS
CODES
USE OF VARIABLES - GRADE
CODES
CODES
CODES
CODES
USE OF OPERATORS – GETTING THE DISCOUNT
CODES
CODES
OPERATORS - CALCULATOR
CODES
CODES
CODES
FUNCTIONS
CODES
CODES
CODES
COMMONLY USED FUNCTIONS ,[object Object]
STRING FUNCTIONS ,[object Object],Syntax: Len(string)  Example: Name=“Monica” Result=Len(Name) Output:  6
STRING FUNCTIONS ,[object Object],Syntax: Left(string, length)  Example: Message=“Hello there” Result=Left(Message,5) Output:  Hello
STRING FUNCTIONS ,[object Object],Syntax: Right(string, length)  Example: Message=“Hello there” Result=Right(Message,5) Output:  there
STRING FUNCTIONS ,[object Object],Syntax: Mid(string, starting position,  length)
STRING FUNCTIONS Example: Message=“Patience is a virtue” Result=Mid(Message,15,6) Output:  virtue
STRING FUNCTIONS ,[object Object],Syntax: UCase(string)  Example: Warning=“Wet Floor” Result=UCase(Warning) Output:  WET FLOOR
STRING FUNCTIONS ,[object Object],Syntax: LCase(string)  Example: Warning=“Wet  Floor” Result=LCase(Warning) Output:  wet floor
STRING FUNCTIONS ,[object Object],Syntax: Val(string)  Example: Num = five Result=Val(Num) Output:  5
COMMONLY USED FUNCTIONS 2. Date Functions – commands used to set the date and time.
DATE FUNCTIONS ,[object Object],Syntax: Date()  Example: Dim Cur_Date as String Cur_Date = Date() Output:  07/10/1978
DATE FUNCTIONS ,[object Object],Syntax: Time()  Example: Dim Cur_Time as String Cur_Time = Time() Output:  2:08:34 PM
DATE FUNCTIONS ,[object Object],Syntax: Now()  Example: lbl2.caption = Now() Output: 11/30/2003 8:30:23 PM
DATE FUNCTIONS ,[object Object],Syntax: Format(string,  specified format)
DATE FUNCTIONS Example: Dim Cur_Date as Date lbl2.caption=Format(Cur_Date,  “ yyyy-mm-dd”) Output:  2009-05-14
COMMONLY USED FUNCTIONS 3. Number Functions – used to change looks of a value.
NUMBER FUNCTIONS ,[object Object],Syntax: Format(string,  specified format)
NUMBER FUNCTIONS Example: Dim Result as Single Result = 245.6 lbl2.caption=Format(Result,”0000.00”) lbl2.caption=Format(Result,”$00.00”) Output:  0245.60 $24.60
COMMONLY USED FUNCTIONS 4. Input/Output Functions – commands used for accepting user information.
INPUT/OUTPUT FUNCTIONS ,[object Object],Syntax: variable=InputBox(“Prompt”,Title, Default_text, x-position, y-position)
INPUT/OUTPUT FUNCTIONS Example: Dim Add as String Add=InputBox(“What is your Address?”, Add, ”Type here”, 900, 1000) Output:
INPUT/OUTPUT FUNCTIONS ,[object Object],Syntax: variable=MsgBox(“Prompt”, Style Value, Title)
INPUT/OUTPUT FUNCTIONS Example: Dim Data as String Data=MsgBox(“Password accepted”, 0  ” Accepting”) Output:
Style Value Named Constant 0 vbOK 1 vbOKCancel 2 vbAbortRetryIgnore 3 vbYesNoCancel 4 vbYesNo 5 vbRetryCancel MESSAGE BOX STYLE VALUES
 
CODES ICONS 16 vbCRITICAL 32 vbQUESTION 48 vbEXCLAMATION 64 vbINFORMATION MESSAGE BOX ICONS

Mais conteúdo relacionado

Destaque

Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
pbarasia
 
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
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
simran153
 
Basic calculator tutorial
Basic calculator tutorialBasic calculator tutorial
Basic calculator tutorial
Gilkye
 

Destaque (20)

The Best Source Code VB
The Best Source Code VBThe Best Source Code VB
The Best Source Code VB
 
Calculator and how to make it using VB 6.0
Calculator and how to make it using VB 6.0Calculator and how to make it using VB 6.0
Calculator and how to make it using VB 6.0
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
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
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Visual Basic Calculator
Visual Basic CalculatorVisual Basic Calculator
Visual Basic Calculator
 
Visual basic menu
Visual basic menuVisual basic menu
Visual basic menu
 
Vb basics
Vb basicsVb basics
Vb basics
 
Basic calculator tutorial
Basic calculator tutorialBasic calculator tutorial
Basic calculator tutorial
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menu
 
Menu vb
Menu vbMenu vb
Menu vb
 
Chapter 4 — Variables and Arithmetic Operations
Chapter 4 — Variables and Arithmetic OperationsChapter 4 — Variables and Arithmetic Operations
Chapter 4 — Variables and Arithmetic Operations
 
Chapter 03 - Program Coding and Design
Chapter 03 - Program Coding and DesignChapter 03 - Program Coding and Design
Chapter 03 - Program Coding and Design
 
Chapter 3 — Program Design and Coding
Chapter 3 — Program Design and Coding Chapter 3 — Program Design and Coding
Chapter 3 — Program Design and Coding
 
Chapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface DesignChapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface Design
 
VB Script
VB ScriptVB Script
VB Script
 
Step By Step To Create A Form Based On Google Docs
Step By Step To Create A Form Based On Google DocsStep By Step To Create A Form Based On Google Docs
Step By Step To Create A Form Based On Google Docs
 
Error handling and debugging in vb
Error handling and debugging in vbError handling and debugging in vb
Error handling and debugging in vb
 

Semelhante a VB Codes

Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
wingsrai
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
tabish
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
tabish
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
Using single row functions to customize output
Using single row functions to customize outputUsing single row functions to customize output
Using single row functions to customize output
Syed Zaid Irshad
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
Marcus Davage
 

Semelhante a VB Codes (20)

Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)Les03 (Using Single Row Functions To Customize Output)
Les03 (Using Single Row Functions To Customize Output)
 
Les03
Les03Les03
Les03
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICA
 
Single row functions
Single row functionsSingle row functions
Single row functions
 
Les03[1] Single-Row Functions
Les03[1] Single-Row FunctionsLes03[1] Single-Row Functions
Les03[1] Single-Row Functions
 
Les03 Single Row Function
Les03 Single Row FunctionLes03 Single Row Function
Les03 Single Row Function
 
Les03 Single Row Functions in Oracle and SQL.ppt
Les03 Single Row Functions in Oracle and SQL.pptLes03 Single Row Functions in Oracle and SQL.ppt
Les03 Single Row Functions in Oracle and SQL.ppt
 
COIS 420 - Practice 03
COIS 420 - Practice 03COIS 420 - Practice 03
COIS 420 - Practice 03
 
Assembly Language -I
Assembly Language -IAssembly Language -I
Assembly Language -I
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Sql 3
Sql 3Sql 3
Sql 3
 
Using single row functions to customize output
Using single row functions to customize outputUsing single row functions to customize output
Using single row functions to customize output
 
07 sap scripts
07 sap scripts07 sap scripts
07 sap scripts
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
 

Último

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
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
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)

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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.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...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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 ...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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"
 

VB Codes