06-03-2009, 02:59 PM
Hi Richa,
Use the below code, return is not the valid syntax
Use the below code, return is not the valid syntax
Code:
Public Function mysum(var1, var2)
' TODO: add function body here
Dim sum
sum=var1+var2
msgbox(var1 & "+" & var2 & "=" & sum)
mysum = sum
End Function
sum=mysum(1,2)
msgbox "Sum=" &sum