Function Chr2Hex(ByVal strChr As String) As String Dim i As Integer For i = 46 To 122 Step 1 If Chr(i) = strChr Then Chr2Hex = Hex(i) Exit Function End If Next End Function Function Chr2HexAd(ByVal strChr As String) As String Dim i As Integer, strA As String strA = "" For i = 1 To Len(strChr) Step 1 If Len(strA) = 0 Then strA = Chr2Hex(Mid(strChr, i, 1)) Else strA = strA & Chr2Hex(Mid(strChr, i, 1)) End If Next Chr2HexAd = strA End Function
Use : Chr2HexAd(text1.text)
Thank DreamClown
ไม่มีความคิดเห็น:
แสดงความคิดเห็น