The following is an excerpt of code from the ATTACHED document. I’m having problems with an If/Then/Else. After running through several paragraphs the Else should be activated, but it is not. The “less than (<)" should be false when K=UBound(ListFormatArray, 1), but it is showing as true. Thanks for any help you can give!! Troy
For K = 1 To UBound(ListFormatArray, 1)
'CHECK OUT THESE VALUES. AFTER THE FIRST RUN THROUGH THEY ARE EQUAL.
MsgBox UBound(ListFormatArray, 1)
MsgBox K
If ExistingNumberStyle ListFormatArray(K, 1) Or _
ExistingNumberFormat ListFormatArray(K, 2) Or _
ExistingParagraphIndent ListFormatArray(K, 3) Then
If FirstRowInArray = True Then
GoTo MoveToFirstRowInArray
End If
‘THIS IS THE LINE OF CODE THAT DOES NOT SEEM TO WORK. AS YOU CAN SEE _
FROM THE MESSAGE BOXES ABOVE, K=1 and UBound(ListFormatArray, 1)=1 _
SO THE “IF” SHOULD GO TO THE “ELSE”, BUT THE IF IS COMING ACROSS AS TRUE.
If K < UBound(ListFormatArray, 1) Then
End If
Else