Function SheetName(ByRef Nom As String) As String
Dim Interdits(), i%, T!
T = Timer
Interdits = Array("[", "]", "\", "/", "?", "*", ":")
Nom = Trim(Nom)
For i = LBound(Interdits) To UBound(Interdits)
Nom = Replace(Nom, Interdits(i), "")
Next
If Len(Nom) > 30 Then Nom = Left(Nom, 30)
If Len(Nom) = 0 Then
Do
Loop While Timer < T + 0.01
Nom = Format(Date, "yymmdd") & Replace(Timer, Application.International(3), "")
End If
SheetName = Nom
End Function