Application.ScreenUpdating

Bonjour tout le monde!

Je viens de me rendre compte que : Application.ScreenUpdating = False cachait les traitements et certaines données sont y réelles. Mais comment l'utilise t-on? Où faut-il le mettre? quand? et on le laisse toujours à false?

Je vous remercie d'avance pour vos explications.

Voici un exemple d'un de cas où j'ai utilisé Application.ScreenUpdating:

 
 Application.ScreenUpdating = False

Call CleanImports

shCommande.Activate

Rows("6:6").Select

Range(Selection, Selection.End(xlDown)).Select

Selection.Sort Key1:=Range("G6"), Order1:=xlAscending, _

Key2:=Range("E6"), Order2:=xlAscending, _

Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _

DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal

Selection.Sort Key1:=Range("A6"), Order1:=xlAscending, _

Key2:=Range("C6"), Order2:=xlAscending, _

Key3:=Range("B6"), Order3:=xlAscending, _

Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _

DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal

Call MakeSynthese

End Sub
 

Bonjour,

L'instruction est à mettre ne début de macro et affiche un écran blanc (donc les modifications en cours ne sont pas visible). La fin de macro (End Sub) rétablie automatiquement ce paramètre sur la valeur "True".

Merci Pedro22 de m'avoir aider, le problème est résolu.

Rechercher des sujets similaires à "application screenupdating"