Clipboard.SetText Text1.Text 这个为复制文本框1的内容。
那么如果我想多复制要怎么实现呢?
一行代码复制text1,text2,text3,text4 等等等等。
然后按Ctrl+v,会按竖直的方式排开 例如下  :text1
text2
text3
text4
....
textn

解决方案 »

  1.   

    用控件数组来表示这些text
    strText=""
    for i=1 to n
        strText=strText & text(i).text
        if i<>n then
            strText=strText & vbcrlf
        end if
    next
      

  2.   

    用控件数组来表示这些text 
    strText="" 
    for i=1 to n 
        strText=strText & text(i).text 
        if i <>n then 
            strText=strText & vbcrlf 
        end if 
    next
    Clipboard.SetText strText
      

  3.   

    Clipboard.SetText Text1.Text & vbCrLf & Text2.Text & vbCrLf & Text3.Text
      

  4.   

    执行上面代码后,要复制到的那个文本框要设置成能够显示多行的。例如:CopyText.MutiSelect=2。然后,在这个文本框内按Ctrl+v即可复制成竖列排行。
      

  5.   

    Private Sub Command1_Click()
    strText = ""
    For i = 0 To Text1.Count - 1
        strText = strText & Text1(i).Text & Chr(13) & Chr(10)
         Next
    Clipboard.SetText strText
    Text2.SetFocus
     SendKeys " ^v "
    End Sub
      

  6.   

    Private Sub Command1_Click()
    strText = ""
    For i = 0 To Text1.Count - 1
        strText = strText & Text1(i).Text & Chr(13) & Chr(10)
         Next
    Clipboard.SetText strText
    Text2.SetFocus
     SendKeys " ^v "
    End Sub