RichTextBox1.LoadFile txtArchivo.TexttxtHex.Text = Ascii2Hex(RichTextBox1.Text)
Public Function Ascii2Hex(sAscii As String) As String Dim nCChar As Integer Dim sHex As String For nCChar = 1 To Len(sAscii) sHex = Hex$(Asc(Mid$(sAscii, nCChar, 1))) Ascii2Hex = Ascii2Hex & CStr(IIf(Len(sHex) = 1, "0" & sHex, sHex)) NextEnd Function