Vb 5.0 in Windows NT 4.
I'm trying to copy from the clipboard, then split the text into separate lines.

Txt = Clipboard.GetText
pos = 1

While Txt <> "" And pos <= Len(Txt)
tempstr = Mid(Txt, pos, InStr(pos, Txt, vbCrLf))
pos = pos + Len(tempstr) + 1
' do something with the line
Wend


I want tempstr to hold each line from the clip board.
Then I want to do something with each line.

The problem is that the vbCrLf is only recognized correctly the first time. On the second line, tempstr ends up actually having 3 lines in it instead of only one.

Anyone know what I'm doing wrong? I know that pos=pos+len(tempstr)+1 might not be exactly right, but the problem I'm having doesn't seem to be related to that.

Wade