Option Explicit 'This accepts a string and returns the ROT-13 encoded/decoded string 'For example "9.3Eric Phelps" becomes "9.3Revp Curycf" and vice-versa Dim strText 'As String strText = InputBox("Enter plain text or ROT-13 encoded text", "ROT-13 Text", "") InputBox "Type ""Ctrl-C"" to copy the following text:", "ROT-13 Text", ROT13(strText) Function ROT13(strString) 'As String Const DOUBLE_ALPHABET = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" Dim strROT13 Dim lngPos Dim intChar For lngPos = 1 To Len(strString) intChar = Instr(DOUBLE_ALPHABET, Mid(strString, lngPos, 1)) If intChar = 0 Then strROT13 = strROT13 & Mid(strString, lngPos, 1) Else strROT13 = strROT13 & Mid(DOUBLE_ALPHABET, intChar + 13, 1) End If Next ROT13 = strROT13 End Function