cheapdrunk
03-18-2006, 07:40 PM
Hi all,
okies... can anyone tell me why Excel flickers even with this simple macro?
ThisWorkBook code:Dim AppClass As New EventClass
Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub
TestModule code:
Public Sub sheet_modified()
Application.ScreenUpdating = False
' --- actual code goes here ---
Application.ScreenUpdating = True
End Sub
EventClassModule code:
Public WithEvents App As Application
Private Sub App_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Call sheet_modified
End Sub.
please note: there would usually be code between the ScreenUpdating statements but for the purposes of testing I have omitted them.
The problem I have is that even if screenupdating is turned off then immediately turned back on, my screen flickers whenever a sheet change happens! :dunno
Has anyone else seen this?
Dan :giggle
okies... can anyone tell me why Excel flickers even with this simple macro?
ThisWorkBook code:Dim AppClass As New EventClass
Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub
TestModule code:
Public Sub sheet_modified()
Application.ScreenUpdating = False
' --- actual code goes here ---
Application.ScreenUpdating = True
End Sub
EventClassModule code:
Public WithEvents App As Application
Private Sub App_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Call sheet_modified
End Sub.
please note: there would usually be code between the ScreenUpdating statements but for the purposes of testing I have omitted them.
The problem I have is that even if screenupdating is turned off then immediately turned back on, my screen flickers whenever a sheet change happens! :dunno
Has anyone else seen this?
Dan :giggle