Anda di halaman 1dari 1

Function AscEncode(str)

Dim i
Dim sAscii

sAscii = ""
For i = 1 To Len(str)
sAscii = sAscii + CStr(Hex(Asc(Mid(str, i, 1))))
Next

AscEncode = sAscii
End Function

Function ChrEncode(str)
Dim i
Dim sStr

sStr = ""
For i = 1 To Len(str) Step 2
sStr = sStr + Chr(CLng("&H" & Mid(str, i, 2)))
Next

ChrEncode = sStr
End Function