1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Private Sub CommandButton23_Click()
Dim ligne As Long
Dim x
Dim MaVariable As String
Dim Temp As Integer
Dim NumPiece As Variant
Dim cIbLE As New DataObject
Temp = CompTeur
ligne = ActiveCell.Row
Set cIbLE = New DataObject
With cIbLE ' pour vider le presse papier
.SetText ""
.PutInClipboard
End With
Set cIbLE = Nothing
ActiveSheet.Cells(ligne, 1).Interior.Color = &HFF0000
MaVariable = "FA-" & Right(ActiveSheet.Cells(ligne, 1), 3) ' N° de facture
Set cIbLE = New DataObject
With cIbLE ' pour coller dans le presse papier
.SetText MaVariable
.PutInClipboard
End With
Application.Wait Time + TimeSerial(0, 0, Temp + 2)
ActiveSheet.Cells(ligne, 1).Interior.Color = &HFF00&
..... |
Partager