Hey guys,
I think that I am having some sort of brain fart. I have a string of numbers say 'ACD'. The string can be anywhere from '' to 'ABCDEFGHIJ'. But for right now it is just 'ACD'. I need to parse through the string letter by letter and find the first missing letter. In this case B. If the string was 'ABDEG' then it would return C. I only need one. Right now i have A-J in an array and i am searching through that with a known letter. For example:
I know that I am missing something. It runs thorugh and then works for the first two but it gives me ABB or something of the like. Any ideas?
I think that I am having some sort of brain fart. I have a string of numbers say 'ACD'. The string can be anywhere from '' to 'ABCDEFGHIJ'. But for right now it is just 'ACD'. I need to parse through the string letter by letter and find the first missing letter. In this case B. If the string was 'ABDEG' then it would return C. I only need one. Right now i have A-J in an array and i am searching through that with a known letter. For example:
Code:
Do While counter < x
'run through the array
Do While y < 10
current = Mid$(sProgIndex, counter2, 1)
If Not current = aProgArray(y) Then
'MsgBox aProgArray(y)
'If Not y = 0 Then y = y - 1
sCurrentIndex = aProgArray(y)
Exit Do
End If
y = y + 1
counter2 = counter2 + 1
Loop
counter = counter + 1
Loop
I know that I am missing something. It runs thorugh and then works for the first two but it gives me ABB or something of the like. Any ideas?