The only ways I can think of include getting the length. The 1st way is to use the function Mid. It'll look like:
The other way is to go through the string character by character and outputting it to a new string. It'd be a loop you start at 2 and end with length-1. This is the worse way.
An even stupider method (that doesn't get the string length) would be to use error handling and temporary variables combined with the 2nd method above. It'd look like this:
Function CutUpString ( StrName as String ) as String
Dim tempStr1,tempStr2 as String
Dim index as Integer
index = 2
On Error goto THEEND
do while (True) 'Yay for infinate loops!
tempStr1=tempStr1+StrName(index) 'this isn't the proper command, but I can't remember what the command to get the character at "index" in VB is.
tempStr2 = StrName(index+1) 'the idea here is it hits an error here when the index is the length. It is trying to access the "length + 1"th character in the string, which doesn't exist. The Error handling causes it to jump to THEEND:. Since it never reaches the line below this one, tempStr2 has all of the characters from 2 until the length - 1.
CutUpString = tempStr2
As you can see, this function is needlessly complicated for what you're trying to do, but I guess it IS possible to trim it without getting the length.
No, No, No, I just thought there was a built in function to trim first and last characters as this is something I do a lot of. I'm using mrtechguy03 suggestion and adding the length to the same line of code. I do like short code and use as little as possible. Most of the variables I get from input files have " or ' around them and I must trim everything and thought I was missing a trim function.