Dim tablo()
Dim i As Integer
Dim x As Byte, cle As Byte
For i = Len(TextBox1) To 1 Step -1
x = x + 1
ReDim Preserve tablo(1 To x)
If i Mod 2 = 0 Then
tablo(x) = (Val(Mid(TextBox1, i, 1)))
Else
tablo(x) = Val(Mid(TextBox1, i, 1)) * 2
End If
Next i
For i = 1 To UBound(tablo)
If Len(tablo(i)) = 1 Then
cle = cle + tablo(i)
Else
cle = cle + Left(tablo(i), 1) + Right(tablo(i), 1)
End If
Next i
MsgBox 'clé : ' & cle