Back to Browse

Excel VBA - Data Encryption and Decryption| Very Simple Method

2.2K views
Sep 1, 2022
8:04

💡 Source Code Public Function DECRYPTION(t As String, dectxt As String) As String Dim new_dectxt() As String, i As Integer, a As Integer, b As Integer, _ n As String new_dectxt = Split(dectxt, ChrW(32)) For i = 1 To Len(t) a = AscW(Mid(t, i, 1)) b = new_dectxt(i - 1) n = n & ChrW(a - b) Next i DECRYPTION = n End Function Sub SendToDatabase(tbval As String, col_index As Byte) Dim ws As Worksheet, i As Integer, a As Integer, r As Integer, nr As String, _ ch As String, nch As String Set ws = Worksheets("Sheet1") For i = 1 To Len(tbval) a = AscW(Mid(tbval, i, 1)) r = WorksheetFunction.RandBetween(1, 300) nr = nr & r & " " ch = ChrW(a + r) nch = nch & ch Next i nr = Left(nr, Len(nr) - 1) lr = ws.Cells(Rows.Count, 3).End(xlUp).Row ws.Cells(lr + 1, col_index).Value = nr ws.Cells(lr + 1, col_index + 1).Value = nch End Sub Private Sub CommandButton1_Click() Call SendToDatabase(username.Value, 1) Call SendToDatabase(password.Value, 3) End Sub ------------------------------------------------------------------------------------------ Buy a Cofee ☕ for theworldofalgorithms: https://ko-fi.com/theworldofalgorithms 🥰Thank you for the donation. I am deeply grateful for your help!🥰 ------------------------------------------------------------------------------------------ #excel #msexcel #msexceltutorial #msexcelcourse #vba #vbatutorial #excelvba #fulltutorial #excelvbatutorial #microsoftexceltutorial #tutorial #exceltutorial #advancedexcel #advancedexceltraining #algorithm #algorithms #programming #program #script #vbamacro #vbamacros #usingmacro #veryuseful #useful #veryusefulmacro #freeeducation #freeprogramming #freelancer #excelfreelancer #vbafreelancer #freelanceservices #form #userform #exceluserform #vbauserform #excelvbauserform #vbaform #label #excellabel #vbalabel #excelvbalabel #commandbutton #vbacommandbutton #data #dataencryption #datadecryption #encryptionanddecryption #encryption #decryption #dataprotection #security #datasecurity #verysimplemethod

Download

0 formats

No download links available.

Excel VBA - Data Encryption and Decryption| Very Simple Method | NatokHD