Convert data from serial port to integer from Arduino device

I’m trying to receive data from a serial port using TextArea1.Text=Serial1.ReadAll().

How do I convert the data to an integer or string?

I’m sending the information from an Arduino device, and sending just integers.
Arduino Code below:
long inches
inches = microsecondsToInches(duration);
Serial.print(inches);

Thanks,

Is the serial returning at least a string?

If so, you can convert it to an integer using Val(input)

If the serial is returning an integer value you can use Str(input) to convert to a string.

I got it to work, my baudrate in my XoJo app didn’t match the arduino.
I just set the baud rate to 9600 in Xojo app and I’m able to get the numbers coming in.

Thanks.