Private Function GetExt(ByVal sUrlOrFile As String, Optional bLCase As Boolean = True) As String
' sUrlOrFile url ou fichier
' bLCase traitement, retour tel quel ou formaté en minuscule
If LenB(sUrlOrFile) > 8 Then
Dim sExt As String
sExt = Right$(sUrlOrFile, Len(sUrlOrFile) - InStrRev(sUrlOrFile, "."))
GetExt = IIf(bLCase, LCase$(sExt), sExt)
Else
GetExt = vbNullString
End If
End Function
' MsgBox GetExt("ftp://site_exemple/un.fichier.ZIp")