View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default Returning an integer from a Function

Function Example (Arg1 as Double) As Double
Example = Arg1*2
End Function

"WannaBeExceller" wrote in
message ...
I am trying to return a variable that I have given a value within a
function.
example: VarX = 10 and then I put in "return VarX" and I keep getting a
compile error. Is there another way of returning the value in vba?