Try changing the following line. *var = Val("&H" & "80")* -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-Chr-VARIABLE-as-Chr-H80-tp58096p58109.html Sent from the gambas-user mailing list archive at Nabble.com.