XorC

Simple small function to Encrypt or Decrypt a string
Test_XorC is for testing the function, test is in VBA-Excel, but XorC can be used in all VBA platforms

CodeFunctionName What is this?

Public

Tested

Imported

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Bold.codes

Linkedin Login

sData, sKey

Sub Test_XorC() ' demo the function!
    Dim r As Range, retVal, sKey As String
    sKey = Application.InputBox("Enter your key", "Key entry", "My Key", , , , , 2)
    retVal = MsgBox("This is the key you entered:" & vbNewLine & Chr$(34) & sKey & Chr$(34) & vbNewLine & _
        "Please confirm OK or Cancel to exit", vbOKCancel, "Confirm Key")
    If retVal = vbCancel Then Exit Sub
    For Each r In Sheets("Sheet1").UsedRange
        If r.Interior.ColorIndex = 6 Then r.Value = XorC(r.Value, sKey)
    Next r
End Sub

Views 5,066

Downloads 1,463

CodeID
DB ID

ANmarAmdeen
702
Attachments
Revisions

v1.0

Sunday
July
1
2018