Example - Function Statement

Sub Main()
    Dim i as Integer
    Dim Msg as String
    For i = 1 to 10
        Msg = Msg & chr(10) & "Input of " & i & " is " & GetColor2(i)
    Next i
    MsgBox Msg
End Sub
Function GetColor2( c% ) As Long     GetColor2 = c% * 25     If c% > 2 Then         GetColor2 = 255' 0x0000FF - Red     End If     If c% > 5 Then         GetColor2 = 65280' 0x00FF00 - Green     End If     If c% > 8 Then         GetColor2 = 16711680' 0xFF0000 - Blue     End If End Function