Professional Documents
Culture Documents
Lec 08 Subprocedures
Lec 08 Subprocedures
Lec 08 Subprocedures
Net
AAPP00-8-3-2 VBN
Sub Procedures
Lecture 8
Topic & Structure of the lesson
Call By Ref
Call By Val
• Sub Procedures
• Function Procedures
• Event Procedures
MAIN PROGRAM
Private Sub Command1_Click( )
‘ Check the parentheses. There is no argument
Call No_arg_No_return( )
End Sub
No arguments
SUB PROCEDURE
Public Sub No_arg_No_return( )
Dim x, y, z As Integer
x = 200
y = 400
z=x+y
Label1.Caption = "TOTAL = " & z
End Sub
• Module Design
– Sub Procedures
– Function Procedures
– Event Procedures
• Sub Procedures
– Do not return a value
– Call By Value
– Call By Reference
Function Procedures
Q&A