Bonjour à tous,
J’ai une macro qui contient un timer, j’aimerais éliminer le scintillement (sous Excel 2010) pendant l'exécution de cette macro.
Module standard :
Module ThisWorkBook :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 Option Explicit Sub Color() Application.ScreenUpdating = False Range("A1").Value = Application.UsableWidth If Application.UsableWidth < 850 Then Range("A1").Interior.Color = RGB(250, 200, 150) Range("A1").Font.Color = vbBlue Else Range("A1").Interior.Color = RGB(100, 400, 100) Range("A1").Font.Color = vbRed End If timer End Sub Sub timer() Application.ScreenUpdating = False On Error Resume Next DoEvents Application.OnTime Now + TimeValue("0:00:01"), "Color" End Sub
Vous trouverez ci-joint le fichier Excel Test2.xlsm
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 Option Explicit Private Sub Workbook_Open() Color End Sub
Je vous remercie de toute aide que vous pourrez m'apporter.
Partager