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
| Sub img_entraineur(home)
Dim i As Integer
Dim club As String
Dim pref As String
Dim adresse As String
If home = True Then
pref = "h"
Else
pref = "g"
End If
i = v_club(Range(pref & "club").Value)
adresse = Feuil2.Cells(100, 101)
club = Feuil2.Cells(1, i)
Feuil1.Range(pref & "entraineur").Select
On Error GoTo A:
Feuil1.Pictures.Insert(adresse & club & ".gif").Select
Selection.Name = pref & "imgentraineur"
GoTo C:
A:
On Error GoTo B:
Feuil1.Pictures.Insert(adresse & club & ".jpg").Select
Selection.Name = pref & "imgentraineur"
GoTo C:
B:
MsgBox ("Impossible de trouver l'image de l'entraineur")
C:
End Sub |