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

validating multine text box data

$
0
0
Hi Friends,

i simple want when user input list of barcode in the Multiline text box . and if any of them (barcode) is less than
8 digits . it needs to validate .barcode(x),barcode(y) ... is less than 8 digit . let me know please .
any help would be highly appreciated .
Code:


 Private Sub btSku_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btSku.Click
        Dim TxtData As String
        Dim x As Long
        Dim barcode() As String
        TxtData = TextBox1.Text
        barcode = TxtData.Split(vbNewLine)
        For x = 0 To UBound(barcode)
            If barcode.Length.ToString() < 8 Then
                If barcode.Length.ToString() > 8 Then
                    MessageBox.Show(barcode(x) + "is less than 8 digit")
                End If
            End If
            MessageBox.Show(barcode(x) + "is more Than 8 digit")
        Next
    End Sub


Viewing all articles
Browse latest Browse all 27554

Trending Articles



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