Hi fellow guru's and masters!
Been a while since I posted and have reached a point whee I need to call upon your widsom.
I searched and the "answers" I found didn't really answer my problem. I am having an issue with a macro that, had no problem last month and now I am getting.
I ran the debugger and it points to the following:
Sub SWDeleteRows()
'
' DeleteRows Macro
' Macro recorded 5/18/2010 by #####'
Dim WS_Count As Integer
Dim I As Integer
' Set WS_Count equal to the number of worksheets in the active
' workbook.
WS_Count = ActiveWorkbook.Worksheets.Count
' Begin the loop.
For I = 1 To WS_Count
Dim J, LastRow, Loc, WS_Name
WS_Name = ActiveWorkbook.Worksheets(I).Name
If WS_Name <> "Attestation" Then
If WS_Name <> "BU_by_PermList" Then
'Activate Worksheet
ActiveWorkbook.Worksheets(I).Select
LastRow = Range("B" & Rows.Count).End(xlUp).Row
Range("A2").Select
'Find Header Column
Cells.Find(What:="%,OH", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 1).Activate
'Get the Active Cell Location
Loc = ActiveCell.Row
For J = LastRow To Loc Step -1
If Cells(J, "E").Value <> Div Then
Cells(J, "E").EntireRow.Delete
End If
Next
Columns("E:E").Select
Selection.EntireColumn.Hidden = True
'Set home cursor location
Range("B2").Select
End If
End If
The Line in "If Cells(J, "E").Value <> Div Then" at the bottom section, is apparently the problem.(or the first of a few)
What do I look for to resolve this issue? I need help ASAP as I am trying to generate a report to be delivered this afternoon.
Bookmarks