Hi All,
I have some code as below which i am using several times in my macro which causes flicker as the screen goes to the sheets back and forth (even though i am using screen updating as false ) how can i achive the same thing without using Activecell and selecting the sheet?
Sheets("D_Sheet").Select
Range("A1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Offset.Value = ActiveCell.Offset(1, 0).Value And ActiveCell.Offset(0, 3).Value = ActiveCell.Offset(1, 3).Value Then
ActiveCell.Offset(1, 0).Select
Rows(ActiveCell.Row).EntireRow.Delete
End If
If ActiveCell.Offset(0, 3).Value <> ActiveCell.Offset(1, 3).Value Or ActiveCell.Offset(0, 1).Value <> ActiveCell.Offset(1, 1).Value Then
ActiveCell.Offset(1, 0).Select
End If
Loop
I have some code as below which i am using several times in my macro which causes flicker as the screen goes to the sheets back and forth (even though i am using screen updating as false ) how can i achive the same thing without using Activecell and selecting the sheet?
Sheets("D_Sheet").Select
Range("A1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Offset.Value = ActiveCell.Offset(1, 0).Value And ActiveCell.Offset(0, 3).Value = ActiveCell.Offset(1, 3).Value Then
ActiveCell.Offset(1, 0).Select
Rows(ActiveCell.Row).EntireRow.Delete
End If
If ActiveCell.Offset(0, 3).Value <> ActiveCell.Offset(1, 3).Value Or ActiveCell.Offset(0, 1).Value <> ActiveCell.Offset(1, 1).Value Then
ActiveCell.Offset(1, 0).Select
End If
Loop