Unable to pass value to setText from Global variable

You show that you have TempPwd as an Integer (getting the height) on this question,

so use one of the convert functions.