Option Explicit
Const OriginalText$ = " Faire défiler du texte dans une cellule ca ne sert a rien a part bouffer de lenergie qui pourrait servir a autre chose"
#If VBA7 Then
Private Declare PtrSafe Function SetTimer Lib "user32.dll" (ByVal hwnd As LongPtr, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As Long
Private Declare PtrSafe Function KillTimer Lib "user32.dll" (ByVal hwnd As LongPtr, ByVal nIDEvent As Long) As Long
#Else
Private Declare Function SetTimer Lib "user32.dll" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As Long
Private Declare Function KillTimer Lib "user32.dll" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
#End If
Dim TimerID&
Sub start()
TimerID = SetTimer(0, 0, 100, AddressOf DefileText)
End Sub
Sub arret()
If TimerID <> 0 Then KillTimer 0, TimerID: TimerID = 0
Feuil1.[E2].Value = OriginalText
End Sub
Sub DefileText()
On Error Resume Next 'gestion d'erreur supprimée
Feuil1.[E2].Value = Mid([E2], 2, Len([E2])) & Left([E2], 1)
On Error GoTo 0
End Sub