I am not sure if this is what you are after.
I am assuming that you are using notepad as a .bas file and then linking this in the variables.
Sub cylinderTest(ByVal InX, ByVal InY, ByVal InZ, ByRef OutX)
If InX > InY And InX > InY then
OutX = InX
ElseIf InY > InZ then
OutX = InY
Else OutX =...