Warning code: BC42105 RRS feed

  • Question

  • Warning code: BC42105  is brought up at the end of my two functions and the Select Cases in those functions at the ends of them. It tells me the Function doesn't return a value on all code paths.

    Code example -

    ``Function DepNum(x As String) As String
            Select Case x
                Case "accounting"
                    Return "101"
                Case "marketing"
                    Return "102"
                Case "human resources"
                    Return "103"
                Case "sales"
                    Return "104"
                Case "research"
                    Return "105"
            End Select
        End Function``

    This is one of my functions in my project. If there is more information i need to give i can. I am rather new to Visual Basic and i am not sure what all i need to give to help aid anyone in answering this.

    Friday, March 29, 2019 1:10 AM


All replies