Strings Two types of Strings Variable length Dim strName as String 0 to approximately 2 billion in length Fixed length Dim strName as String * 10 strName = "Joe" String Functions Pulling Them Apart Left(string, length) strMessage = "I Love Visual Basic" strNewMessage = Left(strMessage, 6) '"I Love" Right(string, length) strNewMessage = Right(strMessage, 6) '" Basic" Mid(string, start[, length]) strNewMessage = Mid(strMessage, 3, 4) '"Love" strNewMessage = Mid(strMessage, 10) '"sual Basic" strNewMessage = Mid(strMessage, 1, 4) '"I Lo" Trim, LTrim, RTrim Removes only spaces off the end of a string strName = " Joe S " If Trim(strName) = "Joe S" Then UCase, LCase If LCase(Trim(strName)) = "joe s" Then Finding A String Within A String InStr([start, ]string1, string2[, compare]) intPosition = InStr(strMessage, "Visual") '8 strSearchFor = "Visual" intPosition = InStr(strMessage, strSearchFor) '8 'Find intPosition = InStr(strMessage, "s") '10 'Find Next intPosition2 = InStr(intPosition+1, strMessage, "s") '17 intPosition2 = InStr(11, strMessage, "s") '17 InstrRev(string1, string2[, start[, compare]]) strFullFileName = "c:\temp\names.txt" intSlash1 = InStr(strFullFileName, "\") '3 intSlash = InStrRev(strFullFileName, "\") '8 strActualName = Mid(strFullFileName, intSlash + 1) Miscellaneous Len(string) intLength = Len(strMessage) '19 Concatentation - use the ampersand & remember to type a space before the &