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 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| Sub Rectangleàcoinsarrondis1_Clic()
Dim x As Long
Dim y As Long
x = Sheets("Employe").Range("A" & Rows.Count).End(xlUp).Row
For y = 2 To x
If Feuil3.Range("H1").Value = Employe.Cells(y, "A").Value Then
Feuil3.Range("B7").Value = Employe.Cells(y, "A").Value
Feuil3.Range("B8").Value = Employe.Cells(y, "B").Value
Feuil3.Range("B9").Value = Employe.Cells(y, "C").Value
Feuil3.Range("B10").Value = Employe.Cells(y, "D").Value
Feuil3.Range("B11").Value = Employe.Cells(y, "E").Value
Feuil3.Range("B12").Value = Employe.Cells(y, "F").Value
Feuil3.Range("B13").Value = Employe.Cells(y, "G").Value
Feuil3.Range("B14").Value = Employe.Cells(y, "H").Value
Feuil3.Range("B15").Value = Employe.Cells(y, "I").Value
Feuil3.Range("B16").Value = Employe.Cells(y, "J").Value
Feuil3.Range("B17").Value = Employe.Cells(y, "K").Value
Feuil3.Range("B18").Value = Employe.Cells(y, "L").Value
Feuil3.Range("B19").Value = Employe.Cells(y, "M").Value
Feuil3.Range("B20").Value = Employe.Cells(y, "N").Value
Feuil3.Range("B21").Value = Employe.Cells(y, "O").Value
Feuil3.Range("B22").Value = Employe.Cells(y, "P").Value
Feuil3.Range("B23").Value = Employe.Cells(y, "R").Value
End If
Next y
Dim i As Picture
Dim j As String
On Error Resume Next
If Target.Address = Range("H1").Address Then
ActiveSheet.Pictures.Delete
j = "C:\Photos\" & Range("H1") & Value & ".jpg"
With Range("E8")
Set i = ActiveSheet.Pictures.Insert(j)
i.Height = 105
i.Width = 95
i.Top = 110
i.Left = .Left
i.Placement = xlMoveAndSize
End With
End If
End Sub |
Partager