Quote Originally Posted by mike7952 View Post
try this

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
I appreciate the help, Mike. I should have no problem figuring out how to reverse this and code the decrypt command button now. Thank you for your help.