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
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim line, i As Integer
Dim tabeau_presentation(), tableau_position() As String
Dim name As InkPicture
UserForm1.Label1.Caption = ""
UserForm1.Label2.Caption = ""
line = Target.Row
name = "toto"
tableau_presentation = Split(Range("R" & line), "*")
tableau_position = Split(Range("R" & line), "*")
If Left(Target.Address, 3) = "$D$" Or Left(Target.Address, 3) = "$E$" Then
UserForm1.Label3.Caption = Range("E" & line) & " " & Range("D" & line) & " (" & Range("O" & line) & " , based " & Range("Q" & line) & ")"
UserForm1.InkPicture1.Picture = ActiveSheet.name.Picture
For i = 0 To UBound(tableau_presentation, 1)
UserForm1.Label2.Caption = UserForm1.Label2.Caption & tableau_presentation(i) & Chr(10)
Next i
For i = 0 To UBound(tableau_position, 1)
UserForm1.Label2.Caption = UserForm1.Label2.Caption & tableau_position(i) & Chr(10)
Next i
UserForm1.Show
End If
End Sub |
Partager