All pastes #216903 Raw Edit

Anonymous

public text v1 · immutable
#216903 ·published 2006-10-23 10:41 UTC
rendered paste body
' crm  direction stuff
Function GetDirection(intDirection As Integer) As String
    Dim strRet

    On Error GoTo ErrorExit


    Select Case intDirection
        Case 0
            strRet = "North"
        Case 1
            strRet = "no way"
        Case 2
            strRet = "NorNorEast"
        Case 3
            strRet = "no way"
        Case 4
            strRet = "NorEast"
        Case 5
            strRet = "no way"
        Case 6
            strRet = "EastNorEast"
        Case 7
            strRet = "no way"
        Case 8
            strRet = "East"
        Case 9
            strRet = "no way"
        Case 10
            strRet = "EastSouEast"
        Case 11
            strRet = "no way"
        Case 12
            strRet = "SouEast"
        Case 13
            strRet = "no way"
        Case 14
            strRet = "SouSouEast"
        Case 15
            strRet = "no way"
        Case 16
            strRet = "South"
        Case 17
            strRet = "no way"
        Case 18
            strRet = "SouSouWest"
        Case 19
            strRet = "no way"
        Case 20
            strRet = "SouWest"
        Case 21
            strRet = "no way"
        Case 22
            strRet = "WestSouWest"
        Case 23
            strRet = "no way"
        Case 24
            strRet = "West"
        Case 25
            strRet = "no way"
        Case 26
            strRet = "WestNorWest"
        Case 27
            strRet = "no way"
        Case 28
            strRet = "NorWest"
        Case 29
            strRet = "no way"
        Case 30
            strRet = "NorWestNor"
        Case 31
            strRet = "no way"
    End Select

    GetDirection = strRet

ExitSub:
    Exit Function

ErrorExit:
    MsgBox Err.Description
    Resume ExitSub

End Function