Screen flickering !!! Help

K

K1KKKA

am using the following code to pull information from a sheet and paste
into another, wanted to stop the screen updating as the macro runs and
have applied the

Application.ScreenUpdating = False - even though this is here it is
still flickering, have i missed something within the statement, i use
it on other macros and have no issues with it??????



Steve


Sub aamonupdate()
ActiveSheet.Unprotect
Application.ScreenUpdating = False
Range("k4").Select
Sheets("Mon").Select
Application.Run "openall"
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Selection.AutoFilter Field:=7, Criteria1:="="
Selection.AutoFilter Field:=4, Criteria1:="<>"
Range("C11:C500").Select
Selection.Copy
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.ScreenUpdating = False
Range("M4").Select
Sheets("Mon").Select
Application.Run "openall"
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Selection.AutoFilter Field:=7, Criteria1:="="
Selection.AutoFilter Field:=4, Criteria1:="<>"
Range("D11:D500").Select
Selection.Copy
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("O4").Select
Sheets("Mon").Select
Range("B11:B500").Select
Application.CutCopyMode = False
Selection.Copy
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("P4").Select
Sheets("Mon").Select
ActiveWindow.LargeScroll ToRight:=1
Range("W11:W500").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Mon").Select
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Sheets("Load Input Sheet").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFiltering:=True
End Sub
 
D

Don Guillett

Your openall macro may have somehting to do with it? Remove your selections.
BTW, you shouldn't need more than ONE Application.ScreenUpdating = False -

A good way to paste values. Make sure ranges are the same size.
Sheets("Load Input Sheet").range("c11:c500").value=Range("d21:d510").value
=======
You shouldn't select unless ABSOLUTELY necessary but what's this?
Range("O4").Select
Sheets("Mon").Select
Range("B11:B500").Select

application.goto Sheets("Mon").Range("B11:B500")
===========

ActiveSheet.Unprotect
Application.ScreenUpdating = False
Range("k4").Select
Sheets("Mon").Select
Application.Run "openall"
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Selection.AutoFilter Field:=7, Criteria1:="="
Selection.AutoFilter Field:=4, Criteria1:="<>"
Range("C11:C500").Select
Selection.Copy
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.ScreenUpdating = False
Range("M4").Select
Sheets("Mon").Select
Application.Run "openall"
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Selection.AutoFilter Field:=7, Criteria1:="="
Selection.AutoFilter Field:=4, Criteria1:="<>"
Range("D11:D500").Select
Selection.Copy
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("O4").Select
Sheets("Mon").Select
Range("B11:B500").Select
Application.CutCopyMode = False
Selection.Copy
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("P4").Select
Sheets("Mon").Select
ActiveWindow.LargeScroll ToRight:=1
Range("W11:W500").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Load Input Sheet").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Mon").Select
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=4
Sheets("Load Input Sheet").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFiltering:=True
End Sub
 
K

K1KKKA

thanks Don,

Didnt realise i had more than one ScreenUpdating.

But originally had 3 macros doing the work one now does, have adjusted
these statements to just one

Sorted,

Many Thanks for your views :)

Steve
 
D

Don Guillett

For archival purposes, it is always best to publish your final solution for
the benefit of others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top