Dim Img As String
Dim x As Long, k As Long
Dim Fichier As String, txt As String
Dim i!
Dim j As Long
Dim rdn As Long
Dim ligneInsertion As Integer
ligneInsertion = 1
Dim CarteDispos As Long
Dim sens As String
Fichier = ThisWorkbook.Path
Randomize
Img = ThisWorkbook.Path & "\face.bmp"
For x = 1 To 39
UserForm1.Controls("Image" & x).Picture = LoadPicture(Img)
Next x
Sheets("Data").Range("B1:B65536").ClearContents
For k = 40 To 52
sens = IIf(k = 13, "Cartes\", "")
rdn = Int((Rnd() * (52 - ligneInsertion) + 1))
txt = Fichier & "\" & sens & Range("E1:E52").Value2(rdn, 1) & ".bmp"
Sheets("Data").Range("B" & ligneInsertion) = Range("E1:E52").Value2(rdn, 1)
ligneInsertion = ligneInsertion + 1
With UserForm1.Controls("Image" & k).Picture = LoadPicture(txt)
.Visible = True
End With
Next k