Hi, I have a set of 5 worksheets which display CustomViews based on the content of a main worksheet (same workbook). The code is below and all is working well.
However I wanted to add some conditional formatting to the main worksheet to check for duplicates. Once I did this I get screen the screen flickering four times every time I update a cell on the main worksheet. Or more accurately every time I update a cell that is in one of the four columns that is referenced in the other worksheets that I run the code below in. Updating other cells does not cause the flicker.
I suspect the .CustomViews("Mine").Show is causing this, but can't think of another solution. Any help appreciated
Private Sub Worksheet_Calculate()
With Application
.EnableEvents = 0
.ScreenUpdating = False
End With
With ActiveWorkbook
.CustomViews.Add ViewName:="Mine", RowColSettings:=True
Me.AutoFilterMode = False
.CustomViews("Mine").Show
.CustomViews("Mine").Delete
End With
With Application
.EnableEvents = 1
.ScreenUpdating = True
End With
End Sub
Bookmarks