Hi I'm new here. I'm making a barcode calutator and I want to know how can I get the positions of all integer in a string because I need their position for calculations. Thanks in advance

Additional info: I'm making an EAN 13 barcode format

So far here's the code I'm using. What I want is I will do
the inputing

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Const TEST_DATA = "8 9 0 4 0 0 0 2 1 0 0 3 C"
        Dim strParts() As String
        Dim lngIndex As Long
        Dim intTotal As Integer
        Dim intCount As Integer
        Dim intUp As Integer

        strParts = Split(TEST_DATA, " ")

        For lngIndex = UBound(strParts) - 1 To 0 Step -2
            For intCount = 1 To 3
                intTotal = intTotal + strParts(lngIndex)
            Next
        Next
        On Error Resume Next
        For lngIndex = UBound(strParts) To 0 Step -2
            intTotal = intTotal + strParts(lngIndex)
        Next
        On Error GoTo 0

        intUp = intTotal
        Do Until intUp Mod 10 = 0
            intUp = intUp + 1
        Loop

        strParts(UBound(strParts)) = intUp - intTotal

        MsgBox(Join(strParts))
    End Sub

Nevermind problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.