Jhai, Thanks a lot, I know vb6 can use the GetText to get clipboard content.
The question is how to read it line by line? (to a string array)

I wonder if you can check for the new line in the clipboard. If yes, you can check

if (looping thru the array) = vbNewLine then

' do whatever

else

'do something else

end if

I have used this when reading a string so you must be able to use it in anarray
strVariable = Replace(strVariable, vbNewLine, vbNullString)

' Sorry to advise you
' the vbNewline does not be recognized by vb6, I had tred following code always rturn False
' first retrieve contents to a variable string OneClpBrd_Content

Private Sub Form_Load()
 TextBox2.Text = ""       '' setup MultiLine=True
 TextBox2.Text = vbNullString        '' setup MultiLine=True
 iPos = InStr(1, OneClpBrd_content, Chr(10))
 If iPos  0 Then
     q = q
 End If
 iPos = InStr(1, OneClpBrd_content, Chr(11))
 If iPos  0 Then
     q = q
 End If
 iPos = InStr(1, OneClpBrd_content, Chr(13))
 If iPos  0 Then
     q = q
 End If
 iPos = InStr(1, OneClpBrd_content, vbCrLf)
 If iPos  0 Then
     q = q
 End If
 iPos = InStr(1, OneClpBrd_content, vbNewLine)
 If iPos  0 Then
     q = q
 End If

 m_dtasplit = Split(OneClpBrd_content, vbNewLine)  ''  , -1, vbTextCompare
 If UBound(m_dtasplit)  0 Then
     a = a
 End If
 m_dtasplit = Split(OneClpBrd_content, Chr(10))  ''  , -1, vbTextCompare
 If UBound(m_dtasplit)  0 Then
     a = a
 End If
  m_dtasplit = Split(OneClpBrd_content, Chr(11))  ''  , -1, vbTextCompare
 If UBound(m_dtasplit)  0 Then
     a = a
 End If
 m_dtasplit = Split(OneClpBrd_content, Chr(13))  ''  , -1, vbTextCompare
 If UBound(m_dtasplit)  0 Then
     a = a
 End If

 m_dtasplit = Split(OneClpBrd_content, vbCrLf)  ''  , -1, vbTextCompare
 If UBound(m_dtasplit)  0 Then
     TextBox2.Text = m_dtasplit(0)
 End If

End Sub
This article has been dead for over six months. Start a new discussion instead.