Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

Small problem in "Select Case Usage" in VB 2010

$
0
0
i have small problem in the select case that displaying values only up to 9th case only although "Rtn" gets different values from above code but it displays output only between '1....9' cases. if the "Rtn" gets values above 9 .the third text shows empty. please help me. if you find any details insufficient rply me
Code:

  Cnt = (fbn + Sbn).Trim
        Lnt = (Cnt.Length)
        Dim Rtn As Integer
        Rtn = Val(Lnt.Length)
        Select Case Rtn
            Case 1
                If Lnt = 1 Then
                    TextBox3.Text = " Brother orSister"
                Else
                    If Lnt = 2 Then
                        TextBox3.Text = "Enemy"
                    Else
                        If Lnt = 3 Then
                            TextBox3.Text = "Enemy "
                        Else
                            If Lnt = 4 Then
                                TextBox3.Text = "Enemyes"
                            Else
                                If Lnt = 5 Then
                                    TextBox3.Text = "Friends"
                                Else
                                    If Lnt = 6 Then
                                        TextBox3.Text = "Marriage "
                                    Else
                                        If Lnt = 7 Then
                                            TextBox3.Text = "Enemys"
                                        Else
                                            If Lnt = 8 Then
                                                TextBox3.Text = "Friend"
                                            Else
                                                If Lnt = 9 Then
                                                    TextBox3.Text = "Enemys"
                                                Else
                                                    If Lnt = 10 Then
                                                        TextBox3.Text = "Lovers "
                                                    Else
                                                        If Lnt = 11 Then
                                                            TextBox3.Text = "Lovers"
                                                        Else
                                                            If Lnt = 12 Then
                                                                TextBox3.Text = "Friend"
                                                            Else
                                                                If Lnt = 13 Then
                                                                    TextBox3.Text = "Brother Or Sister"
                                                                Else
                                                                    If Lnt = 14 Then
                                                                        TextBox3.Text = "Friends"
                                                                    Else
                                                                        If Lnt = 15 Then
                                                                            TextBox3.Text = "Lovers"
                                                                        Else
                                                                            If Lnt = 16 Then
                                                                                TextBox3.Text = "Affection"
 
                                                                                                        End If
                                                                                                    End If
                                                                                                End If
                                                                                            End If
                                                                                        End If
                                                                                    End If
                                                                                End If
                                                                            End If
                                                                        End If
                                                                    End If
                                                                End If
                                                            End If
                                                        End If
                                                    End If
                                                End If
                                            End If
                                     
 End Select

    End Sub


Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>