Use this function to determine, whether a given string represents an integer. function IsInteger(TestThis: String): Boolean;begin try StrToInt(TestThis); except on EConvertError do result := False; else result := True; end;end;