Instead of moving on to the next tab and continuing the rest of the macro, the sub exits after this portion of the macro. After this section, I have the same exact thing, only with different worksheets in the same workbook. Does anyone see something that could be causing it to stop the sub?
Dim LR As Long
Dim texornot As String
Dim Xrow As String
With Sheets("Needs MIL")
'keeps from editing top 2 rows
If WorksheetFunction.CountA(.Cells) = 0 Then
LR = 3
Else
LR = Sheets("Needs MIL").Range("A:F").Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
End If
If LR <= 2 Then LR = 3
With Sheets("Needs MIL").Range("A3:F" & LR).Font
.Name = "Arial"
.Size = 11
End With
With Sheets("Needs MIL").Range("A3:F" & LR)
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
'Row Colors
Sheets("Needs MIL").Select
For X = 3 To 10000
Xrow = X
texornot = ActiveSheet.Range("A" + Xrow).Value
If texornot = "" Then Exit Sub
If ((X Mod 2) = 0) Then
ActiveSheet.Range("A" + Xrow, "F" + Xrow).Select
With Selection.Interior
.ColorIndex = 2
End With
Else
ActiveSheet.Range("A" + Xrow, "F" + Xrow).Select
With Selection.Interior
.ColorIndex = 24
End With
End If
Next X
Bookmarks