Application.ScreenUpdating = False, Not Working, Posting Code

dpalomino1009

New Member
Joined
Mar 3, 2019
Messages
20
Hello,

I can't figure out why Application.ScreenUpdating is not working, the screen flickers every time (after entering data on G2). I tried to figure it out from other posts, but it seems different things work for different people so I'm showing the code I'm struggling with bellow. Please let me know where I went wrong.

Thank you.
___

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next


Application.ScreenUpdating = False


    If Not Intersect(Target, Range("G2")) Is Nothing Then
    
    Application.Goto (ActiveWorkbook.Sheets("Welcome Email & New Hire Info").Range("G2"))
    Application.CutCopyMode = False
    Selection.copy
    
    Application.Goto (ActiveWorkbook.Sheets("User iMac & PC").Range("F192"))
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False


    Application.Goto (ActiveWorkbook.Sheets("User iMac & PC").Range("N2"))
    Application.CutCopyMode = False
    Selection.copy


    Application.Goto (ActiveWorkbook.Sheets("User iMac & PC").Range("D192"))
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False


    Application.Goto (ActiveWorkbook.Sheets("Welcome Email & New Hire Info").Range("H2"))
    Application.CutCopyMode = False
    Selection.copy


    Application.Goto (ActiveWorkbook.Sheets("User iMac & PC").Range("E192"))
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False


    Application.Goto (ActiveWorkbook.Sheets("Welcome Email & New Hire Info").Range("G3"))
    Application.CutCopyMode = False
    
    End If
    
Application.ScreenUpdating = True




On Error Resume Next


Application.ScreenUpdating = False


    If Not Intersect(Target, Range("F2")) Is Nothing Then
    
    Application.Goto (ActiveWorkbook.Sheets("Welcome Email & New Hire Info").Range("A19"))
    Application.CutCopyMode = False
    Selection.copy
    
    Application.Goto (ActiveWorkbook.Sheets("Welcome Email & New Hire Info").Range("A300").End(xlUp).Offset(1, 0).Select)
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False


End If


Application.ScreenUpdating = True


End Sub
 
Last edited by a moderator:

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,123
Office Version
2016
Hi,
try the screenupdateing at the beginnen to false and at the end to true and remove the other screenupdating in between the code.

Not sure if it solve the issue but you could try.

Also please use code tags so it is better to read.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,559
Office Version
365
Platform
Windows
You can also remove all the Goto & Select like
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   Application.ScreenUpdating = False
   If Not Intersect(Target, Range("G2")) Is Nothing Then
      With Sheets("User iMac & PC")
         .Range("F192").Value = Sheets("Welcome Email & New Hire Info").Range("G2").Value
         .Range("D192").Value .Range("N2").Value
         .Range("E192").Value = Sheets("Welcome Email & New Hire Info").Range("H2").Value
      End With
   End If
   If Not Intersect(Target, Range("F2")) Is Nothing Then
      With Sheets("Welcome Email & New Hire Info")
         .Range("A300").End(xlUp).Offset(1, 0).Value = .Range("A19").Value
      End With
   End If
End Sub
 

dpalomino1009

New Member
Joined
Mar 3, 2019
Messages
20
That did the trick!

I guess Excel just doesn't like the Goto and Select all over.

Thank you very much :)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,559
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback

It's always best to avoid things like goto, select & activate, as they slowdown the code
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,095,354
Messages
5,443,966
Members
405,257
Latest member
daveyf

This Week's Hot Topics

Top