Private Sub CommandButton1_Click()
Dim indx As Integer
Dim onedigit As Integer
Dim digits As String
digits = Me.TextBox1.Value
Dim encryp()
ReDim encryp(1 To Len(digits))
For indx = 1 To Len(digits)
onedigit = Mid(digits, indx, 1)
encryp(indx) = (onedigit + 7) Mod 10
Next
Me.TextBox2.Value = encryp(3) & encryp(4) & encryp(1) & encryp(2)
End Sub
Bookmarks