I am getting the error "Object or With block variable not set" on the rng_select.Delete line. I tried Debug.Print.rng_select.address with no luck. My sheet is activated - any ideas?
Sub Delete()
Dim wkb As Workbook
Dim Command As Worksheet, Data As Worksheet, Transfer AsWorksheet, Accredited As Worksheet, FollowUp As Worksheet
Dim LcellData As Long, LcellTransfer As Long, LcellFollowUp As Long, LcellAccredited As Long, a As Long, b As Long
Dim rng_select As Range
Set wkb = Application.ActiveWorkbook
Set Command = wkb.Sheets("Command")
Set Data = wkb.Sheets("Data")
Set Transfer = wkb.Sheets("Transfers")
Set FollowUp = wkb.Sheets("FollowUp")
Set Accredited = wkb.Sheets("Accredited")
LcellFollowUp = FollowUp.Cells(Rows.Count, "A").End(xlUp).Row
FollowUp.Activate
For a = LcellFollowUp To 2 Step -1
If Cells(a, 8).Value = Cells(a - 1, 8).Value Then
If rng_select Is Nothing Then
Set rng_select = Cells(a, 1).EntireRow
Else
Set rng_select = Union(rng_select, Cells(a, 1).EntireRow)
End If
End If
Next a
rng_select.Delete
Exit Sub