|
本帖最后由 35815901 于 2018-3-9 14:09 编辑
Sub 测试复制_批发1()
Dim wjm As String
Dim i&, sj
Dim Data As String
sj = [O1:O100]
wjm = "D:\WD\PF_N " & Format(Now, "yyyymmddhhmmss") & ".txt"
Open wjm For Output As #1
For i = 4 To Sheets("报价").Range("a110").End(xlUp).Row
Data = sj(i, 1)
Print #1, (Data)
Next i
Close #1
Shell "Notepad.exe " & wjm, vbNormalFocus
CopyToClipbox Data
End Sub
Sub CopyToClipbox(strText As String)
With CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
.SetText strText
.PutInClipboard
End With
End Sub
装入剪贴板时,只有最后一行数据,求完善,谢谢
|
|