I have this macro that filters information, copies it, and pastes it into the next sheet. The copy and paste works great but when it tries to delete the visible cells I get an error in the highlighted line
Sub cutRehab(): Dim w1 As Worksheet, w2 As Worksheet
Set w1 = Sheets("Nursing"): Set w2 = Sheets("Rehab+Therapy")
w1.Range("A2").CurrentRegion.AutoFilter field:=30, Criteria1:="Rehab"
w1.UsedRange.Offset(2).SpecialCells(xlCellTypeVisible).Copy w2.Range("A3")
Application.DisplayAlerts = False
w1.UsedRange.Offset(2).SpecialCells(xlCellTypeVisible).Delete
Application.DisplayAlerts = True
w1.AutoFilterMode = False
End Sub
Any help is greatly appreciated. Thank you!
Bookmarks