Results 1 to 4 of 4

Thread: Avoid flickering in excel

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    21
    Rep Power
    0

    Avoid flickering in excel

    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

    Code:
    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
    below code is in sheet1 module
    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

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    21
    Rep Power
    0
    Hi Admin

    Thanks...!
    it do reduce flickering. but i do changes in code like instead of using lot of IF-Else condition i use case statement with If - Else and now its working fine for me.

  4. #4
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Thanks for the feedback
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

Similar Threads

  1. VBA to avoid - "indirect" Formula
    By leopaulc in forum Excel Help
    Replies: 2
    Last Post: 10-23-2012, 05:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •