Ralentir l'exécution d'un macro

Thierry37

XLDnaute Junior
Bonjour,

Je souhaiterai que ma macro s'exécute moins vite, explications :

En fait, j'aimerais que lorsque j'arrive sur la feuille sélectionnée que le titre s'affiche :

soit lentement
soit se mette à clignoter pour attirer l'oeil du lecteur.

Comment faire ?
Merci pour votre aide.
A+

Thierry


voici le code VBA car le serveur de ma société bloque les macros... grrrr !!!! ;-)

Sub tabp1()
'
' tabp1 Macro
' Macro enregistrée le 16/09/2005 par CHAUVIER-00430
'

'
Sheets('P').Select
Range('A1').Select
Selection.Font.ColorIndex = 3
Range('A1').Select
ActiveCell.FormulaR1C1 = 'Accueil Physique'
Range('A1:B1').Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.IndentLevel = 0
.ShrinkToFit = False
.MergeCells = True
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = True
End With
Selection.Merge
Selection.Font.ColorIndex = 1
Selection.Font.ColorIndex = 3
End Sub
Sub tabp2()
'
' tabp2 Macro
' Macro enregistrée le 16/09/2005 par CHAUVIER-00430
'

'
Range('A1').Select
Selection.Font.ColorIndex = 3
End Sub
 

Tenormadness

XLDnaute Nouveau
bonjour,

Sub tabp2()
dim lintNbFois as integer,lintCpt as integer

lintnbfois = 10 ' nombre de fois le clignotements

for lintCpt = 1 to lintnbfois
select lintcpt mod 2
case 1
Range('A1').Font.ColorIndex = 3
case0
Range('A1').Font.ColorIndex = xlnone ' on index de la couleur blanc
end select
application.wait (Now + TimeValue('0:00:01')) ' clignote une seconde
next lintCpt

End Sub
 

Discussions similaires

Membres actuellement en ligne

Statistiques des forums

Discussions
312 215
Messages
2 086 329
Membres
103 183
dernier inscrit
karelhu35