vendredi 13 décembre 2019

How to simplify many "If Then Else" Querries?

can you give me a hint on how to make such code more elegant? I need some more of this querries in the future and i would like to do it more professional.

Thank you!

       If Case = "V" Then
            Case Is = "Sal"
        Else
            If Case = "K" Then
                Case Is = "Dep"
            Else
                If Case = "A" Then
                    Case Is = "Auf"
                Else
                    If Case = "M" Then
                        Case Is = "Mon"
                    Else
                        If Case = "T" Then
                            Case Is = "Tec"
                        Else
                            If Case = "W" Then
                                Case Is = "Ver"
                            Else
                                If Case = "B" Then
                                    Case Is = "Ber"
                                Else
                                    If Case = "P" Then
                                        Case Is = "Ver"
                                    Else
                                        GoTo GoNext
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            End If
        End If

Aucun commentaire:

Enregistrer un commentaire