Dim Str As String
Dim ii as int
str = Chr(0x00) & Chr(0x00) & Chr(0x00) & Chr(0xA9)
'just to make sure we're talking about the same thing
Log( "Length = " & Str.Length ) '4 characters
Log( "Last character code = " & Asc(Str.CharAt(3)) ) 'A9 hex = 169 decimal
'if so, then this be what ye want
ii = Asc(Str.CharAt(3)) + 2
MyEditText.Text = ii 'Int value 171 will be cast to a 3-character string "171"