In excel VBA I have a sub that takes in 3 variables and in running the code generates 5 new variables. I would like to 5 either a single function or 5 different functions to return each of these variables without having redundant code where I have to repeat the same code in all 5 functions. See example below for my sub code:
Sub MySub(Input1 as Integer, Input2 as Integer, Input3 as Integer)
Dim Output1 as Integer
Dim Output2 as Integer
Dim Output3 as Double
Dim Output4 as Double
Dim Output5 as String
MyVBACode
EndSub
Solved by V. B. in 23 mins