Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Sub Tst_pmo()
Dim X As Long
Dim OldY1 As Long
Dim Y1 As Long
Dim OldY2 As Long
Dim Y2 As Long
Dim Z1 As Long
Dim Z2 As Long
Dim C As Range
Dim i As Long
[a1] = Application.Proper(Format(Date, "dddd dd mmmm yyyy "))
[a2] = "Semaine: " & DatePart("ww", Date, vbMonday) & " " & _
DatePart("y", Date, vbMonday) & " ième Jour de l" & Chr(180) & "année" & " "
With [a1:a2].Font
.FontStyle = "Normal"
.ColorIndex = xlAutomatic
End With
X = 1
Y1 = InStr(InStr([a1], " ") + 2, [a1], " ") + 1
Y2 = InStr(InStr([a2], " ") + 12, [a2], " ") + 1
OldY1 = Y1
OldY2 = Y2
Z1 = Len([a1])
Z2 = Len([a2])
Custom [a1:a2].Characters(X, 1)
Custom [a1].Characters(Y1, 1)
Custom [a2].Characters(Y2, 1)
'*** CODE POUR LE DEFILEMENT DES DEUX MESSAGES CELLULES A1/A2
Set C = [a1]
Standard C
X = Z1 + 1
For i = 1 To 40
X = X - 1
If X = 0 Then
X = Z1
Standard C
End If
Y1 = Y1 - 1
If Y1 = 0 Then
Y1 = Z1
Standard C
End If
C = Right(C, Z1 - 1) + Left(C, 1)
Custom C.Characters(X, 1)
Custom C.Characters(Y1, 1)
Sleep 150
Next i
C = Application.Proper(Format(Date, "dddd dd mmmm yyyy"))
Standard C
Custom C.Characters(1, 1)
Custom C.Characters(OldY1, 1)
Application.Wait (Now + TimeValue("00:00:03"))
Set C = [a2]
Standard C
X = Z2 + 1
For i = 1 To 45
X = X - 1
If X = 0 Then
X = Z2
Standard C
End If
Y2 = Y2 - 1
If Y2 = 0 Then
Y2 = Z2
Standard C
End If
C = Right(C, Z2 - 1) + Left(C, 1)
Custom C.Characters(X, 1)
Custom C.Characters(Y2, 1)
Sleep 150
Next i
C = "Semaine: " & DatePart("ww", Date, vbMonday) & " " & _
DatePart("y", Date, vbMonday) & " ième Jour de l" & Chr(180) & "année"
Standard C
Custom C.Characters(1, 1)
Custom C.Characters(OldY2, 1)
End Sub
Sub Standard(ByRef R As Range)
With R.Font
.ColorIndex = 0
.Bold = False
End With
End Sub
Sub Custom(ByRef Ch As Characters)
With Ch.Font
.FontStyle = "Gras"
.ColorIndex = 3
End With
End Sub