René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Return values [VBA snippet] | ||
function return_twice_the_argument(a as single) msgbox("Argument is: " & a) return_twice_the_argument = 2*a end function sub f dim r as single ' No parantheses, returned value ' not needed: return_twice_the_argument 4 ' With parantheses, returned value ' assigned to r r = return_twice_the_argument(5) msgbox("Returned was: " & r) let r = return_twice_the_argument 6 end sub |