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:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,164
Office Version
  1. 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
56,562
Office Version
  1. 365
Platform
  1. 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
56,562
Office Version
  1. 365
Platform
  1. 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,129,574
Messages
5,637,163
Members
416,959
Latest member
Mohzein

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top