💡 Source Code
Public Function CONVTXT(ByVal txt As String) As String
Dim tl As Integer, ntl As Integer, i As Integer, ntxt As String
tl = Len(txt)
ntl = tl
For i = 1 To tl
If i ◀= tl / 2 Then
ntxt = ntxt & Mid(txt, ntl, 1) & Mid(txt, i, 1)
ntl = ntl - 1
End If
Next i
If tl Mod 2 = 0 Then CONVTXT = ntxt Else: CONVTXT = ntxt & Mid(txt, Int(tl / 2) + 1, 1)
End Function
Public Function CONVTXTBACK(ByVal txt As String) As String
Dim lt As Integer, nlt1 As Integer, nlt2 As Integer, i As Integer, ntxt1 As String, ntxt2 As String
lt = Len(txt)
nlt1 = lt - 1
nlt2 = lt - 2
For i = 1 To lt
If lt Mod 2 = 0 Then
If i Mod 2 = 0 Then
ntxt1 = ntxt1 + Mid(txt, i, 1)
Else:
ntxt2 = ntxt2 + Mid(txt, nlt1, 1)
nlt1 = nlt1 - 2
End If
Else:
If i Mod 2 = 0 Then ntxt1 = ntxt1 + Mid(txt, i, 1)
If nlt2 ▶= 1 Then
ntxt2 = ntxt2 & Mid(txt, nlt2, 1)
nlt2 = nlt2 - 2
End If
End If
Next i
If lt Mod 2 ▶ 0 Then ntxt1 = ntxt1 & Right(txt, 1)
CONVTXTBACK = ntxt1 & ntxt2
End Function
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = CONVTXT(TextBox1.Value)
ws.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0) = CONVTXT(TextBox2.Value)
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