Salsasteve
11-02-2009, 05:18 AM
I have a Workbook with four worksheets, one of which, called "Rota", flickers as if it is writing the whole screen when it is activated, despite the fact that I have turned off screen updating in worksheet activation. I can't figure it out. The other sheets don't flicker when activated and it is beginning to annoy me!
Any help would be appreciated! Code for worksheet activation below.
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
'On Error GoTo ErrorHandler
If Not HolidaysAssigned Then
Call DeleteHolCodes
Call AssignHol
End If
'Check if Rota toolbar exists
Dim MyBar As CommandBar
Dim RotaBarExists As Boolean
For Each MyBar In Application.CommandBars
If MyBar.Name = "Rota" Then RotaBarExists = True
Next MyBar
If Not RotaBarExists Then Call CreateToolbar
Application.CommandBars("Rota").Visible = True
Call EnableToolbar
Application.ScreenUpdating = True
Exit Sub
ErrorHandler:
Application.ScreenUpdating = True
MsgBox "Error in Rota Activation code, please notify programmer ", vbExclamation, "Error!"
End Sub
Any help would be appreciated! Code for worksheet activation below.
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
'On Error GoTo ErrorHandler
If Not HolidaysAssigned Then
Call DeleteHolCodes
Call AssignHol
End If
'Check if Rota toolbar exists
Dim MyBar As CommandBar
Dim RotaBarExists As Boolean
For Each MyBar In Application.CommandBars
If MyBar.Name = "Rota" Then RotaBarExists = True
Next MyBar
If Not RotaBarExists Then Call CreateToolbar
Application.CommandBars("Rota").Visible = True
Call EnableToolbar
Application.ScreenUpdating = True
Exit Sub
ErrorHandler:
Application.ScreenUpdating = True
MsgBox "Error in Rota Activation code, please notify programmer ", vbExclamation, "Error!"
End Sub