1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Public Property Get presse_papier() As String
presse_papier = CreateObject("htmlfile").parentwindow.clipboardData.GetData("TEXT")
End Property
'
Sub test2()
Set plage = Sheets(1).Range("A1:c10")
plage.Copy
MsgBox control_pressepapier(plage)
Application.CutCopyMode = False
End Sub
'
'
Function control_pressepapier(plage)
texte = Trim(Replace(Replace(presse_papier, vbTab, ""), vbCrLf, ""))
x1 = plage.Cells(1).Text = Left(texte, Len(plage.Cells(1).Text))
x2 = plage.Cells(plage.Cells.Count).Text = Right(texte, Len(plage.Cells(plage.Cells.Count).Text))
control_pressepapier = x1 And x2
End Function |
Partager