Public Function PerformEncryption(ByRef strPassword As String, ByVal boo As Boolean) As String
' boo = True then Encrypt, boo = False then Decrypt
Dim strCode As String, intCounter As Integer
For intCounter = 1 To Len(strPassword)
If intCounter Mod 2 = 0 Then
If boo = True Then
strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) + 1)
Else
strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) - 1)
End If
Else
If boo = True Then
strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) + 2)
Else
strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) - 2)
End If
End If
Next intCounter
PerformEncryption = strCode
End Function