Private Sub CommandButton2_Click() 'Tout placer
Dim Row As Integer, Col As Integer
Dim File As Variant, Fso As Object
Application.ScreenUpdating = False
CommandButton3_Click
[A3] = 0
Set Fso = CreateObject("Scripting.FileSystemObject")
Row = 3
Col = Columns("B").Column
For Each File In Fso.GetFolder([PhotoDir]).Files
If File.Name Like "*.jpg" Then
[A3] = [A3] + 1
Cells(Row, Col) = Fso.getBasename(File)
PlaceThePictureInCenterRange Cells(Row - 1, Col), Shapes.AddPicture(File, False, True, 20, 20, -1, -1), 90
If Col = Columns("J").Column Then
Col = 2: Row = Row + 3
Else
Col = Col + 2
End If
End If
Next
Set Fso = Nothing ' Libération mémoire
End Sub
End Sub