J John Aug 27, 2007 #1 Hi How can I extract the first line form a multi-line string? Many Thanks Regards
S Stefan Hoffmann Aug 27, 2007 #2 hi John, How can I extract the first line form a multi-line string? Click to expand... Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the first line. mfG --> stefan <--
hi John, How can I extract the first line form a multi-line string? Click to expand... Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the first line. mfG --> stefan <--
D Douglas J. Steele Aug 27, 2007 #3 Stefan Hoffmann said: hi John, Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the first line. Click to expand... Or Split(yourString, Chr(13) & Chr(10))(0)
Stefan Hoffmann said: hi John, Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the first line. Click to expand... Or Split(yourString, Chr(13) & Chr(10))(0)
S Stefan Hoffmann Aug 27, 2007 #5 hi Stuart, Stuart said: MyStringVariable = Left(MultiLine, Instr(MultiLine, vbCrLf) - 1) Click to expand... As the OP has posted it also in mpa.queries: The VBA constant vbCrLf is not available in a query and must be replaced with Chr(13) & Chr(10) in that case. mfG --> stefan <--
hi Stuart, Stuart said: MyStringVariable = Left(MultiLine, Instr(MultiLine, vbCrLf) - 1) Click to expand... As the OP has posted it also in mpa.queries: The VBA constant vbCrLf is not available in a query and must be replaced with Chr(13) & Chr(10) in that case. mfG --> stefan <--