truncate last character

J

Jim Franklin

Hi Hillary,

Use the LEFT and LEN functions to return a portion of your string.

LEFT Returns a Variant (String) containing a specified number of characters
from the left side of a string.
Syntax: Left(string, length)
LEN returns the length of a given string.
Syntax: Len(string)

To truncate the last character, if you are using vb code, your code would
look something like:

MyString = left(MyString, Len(MyString)-1))

Note: if you are doing this simply to remove trailing spaces from a string,
you would be better using the TRIM function.

Hope this helps,
Jim
 
Top