Sub srtdecodifica(strvalcod As String, strvalori As String) Dim vstr As String * 94, strvalaux As String, lrg1 As Integer Dim cnt1 As Integer, cnt2 As Integer, lrg As Integer Dim cnt3 As Integer, cnt4 As Integer vstr = "q1weZA2QrtyE3VFu4ioXS5Wpa6sC7DRd8fgB9GThjkNHz0YlxM" _ & "JUcbOvPnImKL_-+*/.,:;#@>?<&{=}[!]%$\~^`(')|" & Chr(34) lrg1 = Len(strvalcod) lrg = Fix(lrg1 / 2) If lrg1 = 0 Then strvalori = strvalcod Else strvalori = "" cnt1 = Fix(lrg / 2) cnt2 = cnt1 * 2 If cnt2 = lrg Then cnt4 = 2 Else cnt4 = 1 End If strvalaux = "" Do Until cnt4 > lrg1 strvalaux = Trim(strvalaux) & Mid(strvalcod, cnt4, 1) cnt4 = cnt4 + 2 Loop lrg = Len(strvalaux) For cnt1 = 1 To lrg cnt3 = 0 For cnt2 = 1 To 94 If Mid(strvalaux, cnt1, 1) = Mid(vstr, cnt2, 1) Then cnt3 = cnt2 - cnt1 If cnt3 < 0 Then cnt3 = cnt2 End If Exit For End If Next If cnt3 = 0 Then cnt3 = cnt1 End If strvalori = Trim(strvalori) & Mid(vstr, cnt3, 1) Next End If End Sub