I have some VBA code that I turn screen updating off to keep the screen from flashing, then turn it on later just before I end, however part of my code is doing some copy pasting, so if I turn it on after I do the copy paste, I don't see any of the data that is copy/pasted. If I turn it on before I start the copy/paste, the cells get updated, but the user sees all the screen flashing as it does the copy paste. What am I doing wrong, or how can I resolve this?
Thanks,
Don
Code:
Sub currentcode()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
.....do a bunch of stuff....
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
....do the copy pasting......
End Sub
Code:
Sub WhatIwouldlike()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
.....do a bunch of stuff....
....do the copy pasting......
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
End Sub
Thanks,
Don