SierraV
Computer
- Dec 24, 2018
- 1
Hi Guys,
I have this vb code : -
However the XML result doesn't go to the else statement, keeps on repeating the If and calls the WriteHeaderStart(a). Can anyone help?
I have this vb code : -
If LineCode <> NextLineCode Then
Call WriteHeaderStart(a)
SequenceNumber = 1
Call WriteSubLine(a)
NextLineCode = Worksheets("Entries").Cells(Itemrow + 1, 1)
Else
SequenceNumber = SequenceNumber + 1
Call WriteSubLine(a)
NextLineCode = Worksheets("Entries").Cells(Itemrow + 1, 1)
End If
If NextLineCode <> LineCode Then
Call WriteHeaderEnd(a)
NextLineCode = ""
End If
Itemrow = Itemrow + 1
Call WriteHeaderStart(a)
SequenceNumber = 1
Call WriteSubLine(a)
NextLineCode = Worksheets("Entries").Cells(Itemrow + 1, 1)
Else
SequenceNumber = SequenceNumber + 1
Call WriteSubLine(a)
NextLineCode = Worksheets("Entries").Cells(Itemrow + 1, 1)
End If
If NextLineCode <> LineCode Then
Call WriteHeaderEnd(a)
NextLineCode = ""
End If
Itemrow = Itemrow + 1
However the XML result doesn't go to the else statement, keeps on repeating the If and calls the WriteHeaderStart(a). Can anyone help?