Hi
when i open the workbook the excel workbook display start flickering for nearly about 9 seconds then it stops. I dont understand the reason.
in a workbook the code written for worksheet event change ; workbook open event and in standard module.
How can i avoid the flickering in excel ? Please help to shrink the code as well. I will appreciate any help on this.
below code is in thisworkbook module
below code is in sheet1 moduleCode:Private Sub Workbook_Open() On Error Resume Next Application.DisplayAlerts = False: Application.ScreenUpdating = False: Application.Calculation = xlCalculationManual Call eset Call work On Error Resume Next Range("K10").MergeArea.ClearContents Range("K12").MergeArea.ClearContents Union(Range("M32:M35"), Range("O32:O35"), Range("Q32:Q35"), Range("S32:S35"), Range("K40"), Range("S40"), Range("O42"), Range("M49").MergeArea.ClearContents Application.DisplayAlerts = True: Application.ScreenUpdating = True: Application.Calculation = xlCalculationAutomatic On Error GoTo 0 End Sub
Code:Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next Application.DisplayAlerts = False: Application.ScreenUpdating = False: Application.Calculation = xlCalculationManual Dim R1 If Target.Address = "$A$10" And Len(Range("$A$10")) < 3 Then R1 = MsgBox("Name must be more then 3 Character : Calculated " & Len(Range("$A$10")), vbOKOnly, "Warning") End If Dim R If Target.Address = "$K$18" Then R = MsgBox("Refresh Plan Details", vbYesNo, "CONFIRM") If R = vbYes Then Call work Call Monitor Call eset Range("K22").MergeArea.ClearContents Range("K24").MergeArea.ClearContents Union(Range("M32:M35"), Range("O32:O35"), Range("Q32:Q35"), Range("S32:S35"), Range("K40"), Range("S40"), Range("O42"), Range("M77:M85")).ClearContents Sheet1.Select End If End If If Target.Address = "$K$24" Then Call Temp End If Application.DisplayAlerts = True: Application.ScreenUpdating = True: Application.Calculation = xlCalculationAutomatic On Error GoTo 0 End Sub


Reply With Quote

Bookmarks