View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default User defined function

Try:
Function test(num) As String
Select Case num
Case Is 0
test = "Positive"
Case Is = 0
test = "Zero"
Case Is < 0
test = "Negative"
End Select
End Function


You must declare the 'data type' to be returned as shown.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc