Lesson#9 Call Procedures and Pass Data Between Procedures Flashcards
What are the 2 separate procedures involved, when calling a procedure?
The caller and the called.
What are the 3 different ways to call a procedure?
- Procedure name and its arguments.
- Call keyword
- Application.Run method
What does procedure scope refer to?
The procedures that can call a specific procedure.
How do you specify a sub procedures scope?
Adding the appropriate keyword prior to the Sub keyword.
What are the 2 main rules for a Public procedure scope?
It is the default scope and can generally be called by any procedure.
What is the main rule for a Private procedure scope?
It can be called by procedures in its same module.
What are arguments?
They allow you to pass data to a procedure, the procedure that receives the arguments can use that data when executed.
What type of procedure do you have to use when data flows from the caller procedure to the called procedure?
Both can be Sub or Function procedures.
What type of procedure do you have to use when data flows from the called procedure to the caller procedure?
The called procedure must be a Function procedure.
How do you declare a procedure that receives arguments in a statement?
Sub ProcedureName(ArgumentList)
How do you declare a procedure that receives arguments with data types in a statement?
Add “As” then the “DataType”
What are the 2 rules to take into account when declaring optional arguments?
Optional goes before the name of the first optional argument, all arguments to the right of Optional are optional.
What rule do you need to take into account when specifying a default value for an optional argument?
Using the assignment operator (=) after argument name and data type
How do you pass arguments to a procedure which has been called by the procedure name and arguments method?
Arguments aren’t within parentheses.
How do you pass arguments to a procedure which has been called by the Call keyword method?
Arguments are within parentheses.