Hi everyone,
Below is my code to go and pick all the even number from right. But I am not able to do it .Bar
TotalOdd will be 57
But I want to get 75. Could you look at the code & help me figure out where I should modify my code. I tried right function but not able to get it.
Any suggestions will be helpful.
Thank you
Dim i As Integer
Dim TotalOdd As String
Dim Total As Integer
Dim Barcode As String
Dim checkdigit As Integer
Barcode = 4567
'get odd numbers
MsgBox Len(Barcode)
For i = 1 To Len(Barcode)
i = i - 1
TotalOdd = TotalOdd + (Mid(Barcode, i, 1))
MsgBox TotalOdd
Next i
Below is my code to go and pick all the even number from right. But I am not able to do it .Bar
TotalOdd will be 57
But I want to get 75. Could you look at the code & help me figure out where I should modify my code. I tried right function but not able to get it.
Any suggestions will be helpful.
Thank you
Dim i As Integer
Dim TotalOdd As String
Dim Total As Integer
Dim Barcode As String
Dim checkdigit As Integer
Barcode = 4567
'get odd numbers
MsgBox Len(Barcode)
For i = 1 To Len(Barcode)
i = i - 1
TotalOdd = TotalOdd + (Mid(Barcode, i, 1))
MsgBox TotalOdd
Next i