Like this? '-------------------------------------------------------------------------------- ' ' Return a hex byte from a string ' '-------------------------------------------------------------------------------- Public Function ReturnHexByte(Text$) As Byte ' Locals Dim Value As Byte ' Convert to upper case Utext$ = UCase(Text$) ' String of allowed hex characters HexString$ = "0123456789ABCDEF" Value = 0 For i& = 0 To 15 If Mid(Utext$, 1, 1) = Mid(HexString$, i& + 1, 1) Then Value = Value + (16 * i&) End If If Mid(Utext$, 2, 1) = Mid(HexString$, i& + 1, 1) Then Value = Value + i& End If Next i& ReturnHexByte = Value End Function At 4/15/2003 10:17 PM +0100, you wrote: >Hi list > >It seems other people are at the same stage as myself - starting with VB. > >My request, could anybody help me with a simple ascii to hex conversion >routine. > >My application, I am reading the serial port ok (i2c rtc to pic) but am >unable >to display the resultant yy mm dd day hh mm ss in a text box, just showing >ascii characters. > >Thanks > >Steve > > > > >----------------------------------------------------------------------- >Information in this email may be privileged, confidential and is >intended exclusively for the addressee. The views expressed may >not be official policy, but the personal views of the originator. >If you have received it in error, please notify the sender by return >e-mail and delete it from your system. You should not reproduce, >distribute, store, retransmit, use or disclose its contents to anyone. > >Please note we reserve the right to monitor all e-mail >communication through our internal and external networks. >----------------------------------------------------------------------- > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body