In my project, I'm reading a html file with vba codes and I'm scannig it with some substrings then I'm creating a json file with these substrings. SUBTASK is one of my substrings. When I'm scanning the html file, it's finding 9 SUBTASK but in my html file there are more than 9. My codes like this.
For i = 1 To lastrow
txt = Cells(i, 1)
If txt = "All" Or txt = "ALL" Or txt = "V2500-A5" Then 'Or txt = "V2500-A1"
engType = txt
End If
If txt = "About" Then GoTo skipNextRow
If Left(txt, 1) <> "0" And Left(txt, 5) <> "TASK " And Left(txt, 4) <> "DMC:" And Right(Left(txt, 11), 8) <> "SUBTASK " Then GoTo skipNextRow
If Left(txt, 5) = "TASK " Then
locationTASK = InStr(1, txt, "TASK ")
ElseIf Left(txt, 4) = "DMC:" Then
locationDMC = InStr(1, txt, "DMC:")
locationIssueNo = InStr(1, txt, "Issue No:")
locationIssueDate = InStr(1, txt, "Issue Date:")
ElseIf Right(Left(txt, 11), 8) = "SUBTASK " Then
Debug.Print "Subtask: " & txt
locationSUBTASK = InStr(1, txt, "SUBTASK ")
End If
skipNextRow:
Next i
ReDim Preserve arrApplicability(w): arrApplicability(w) = engType
ReDim Preserve arrPartNo(w): arrPartNo(w) = myTemp
w = w + 1
My issue in SUBTASK section, there are no issue in other sections.