How to return more than one value from a function?
Answer Posted / ravivarman_r
Public Type Income
Wages As Currency
Dividends As Currency
Other As Currency
Total As Currency
End TypeYou can now use this structure as the return
type for a function. In a real situation, the function
would look up your database tables to get the values, but
the return values would be assigned like this:
Function GetIncome() As Income
GetIncome.Wages = 950
GetIncome.Dividends = 570
GetIncome.Other = 52
GetIncome.Total = GetIncome.Wages +
GetIncome.Dividends + GetIncome.Other
End FunctionTo use the function, you could type into
the Immediate Window:
GetIncome().Wages
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
what are local and global variables and their differences? : Sql dba
What is crud diagram?
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
What is cross join sql?
What is a data manipulation language?
What is data types in sql?
Explain what is a view?
Is it possible to link two groups inside a cross products after the cross products group has been created?
What does trigger mean in slang?
What is the purpose of a secondary key?
How to pronounce postgresql?
What are primary key and foreign key and how they work?
Which is better varchar or nvarchar?
How can get second highest salary in sql?
What is recursive join in sql?