String extraction

  • Thread starter Thread starter John
  • Start date Start date
hi John,
How can I extract the first line form a multi-line string?
Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the
first line.


mfG
--> stefan <--
 
Stefan Hoffmann said:
hi John,

Use Left(yourString, InStr(yourString, Chr(13) & Chr(10))) to get the
first line.

Or Split(yourString, Chr(13) & Chr(10))(0)
 
hi Stuart,

Stuart said:
MyStringVariable = Left(MultiLine, Instr(MultiLine, vbCrLf) - 1)
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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top