Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

Return value from user-defined function

Function Tax(ProfitBeforeTax As Double) As Double   If ProfitBeforeTax > 0 Then Tax = 0.3 * ProfitBeforeTax Else Tax = 0 End Function Sub test()     MsgBox Tax(100) End Sub