هذه طريقة الترميز .....
Dim dgt As String
Dim myv As String
txts = ""
Dim i
For i = 1 To Len(txtr)
dgt = AscW(Mid(txtr, (i), 1))
txts = txts & "Chrw (" & dgt & ") & "
Next i
myv = Left(txts, (Len(txts) - 2))
txts = myv
وهذه طريقة فك الترميز
Loopy = (CDbl(Len([txts]) - Len(Replace([txts], ")", ""))))
txtx = ""
c0 = 1
Do
c1 = Nz(InStr(c0 + 1, Me.txts, "("), 0)
c2 = Nz(InStr(c1 + 1, Me.txts, ")"), 0)
c3 = c2 - c1
If c1 <> 0 And c2 <> 0 Then c4 = Mid(Me.txts, c1 + 1, c3 - 1)
Loopy = Loopy - 1
c0 = c2
Me.txtx = Me.txtx + CHARW(c4)
Loop Until Loopy = 0
و هذا هو الفانك ...
Function CHARW(CharCode As Variant, Optional Exact_functionality As Boolean = False) As String
If UCase(Left$(CharCode, 1)) = "U" Then CharCode = Replace(CharCode, "U", "&H", 1, 1, vbTextCompare)
CharCode = CLng(CharCode)
If CharCode < 256 Then
If Exact_functionality Then
CHARW = ChrW(CharCode)
Else
CHARW = Chr(CharCode)
End If
Else
CHARW = ChrW(CharCode)
End If
End Function
اكيد قديمة ............. صحيح ..... لاني شفت الطريقة هذه من ايام دنيا دنيا ..... هههههههه