I would need following macro to work on Mac. Importing images from a folders works perfectly on Windows, but I can't get it work on mac. I would like it to be possible to choose the folder. Thanks in advance!
Code:
Sub InsertPictures()
Dim PicList() As Variant
Dim PicFormat As String
Dim Rng As Range
Dim sShape As Shape
Dim a As Integer
Dim xColIndex As Integer
Dim xRowIndex As Integer
On Error Resume Next
PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
xColIndex = 40
xRowIndex = 14
a = 1
If IsArray(PicList) Then
For lLoop = LBound(PicList) To UBound(PicList)
Set Rng = Range(Worksheets("Report").Cells(xRowIndex, xColIndex), Worksheets("Report").Cells(xRowIndex + 9, xColIndex + 17))
Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
If a Mod 2 = 0 Then
xColIndex = xColIndex - 18
xRowIndex = xRowIndex + 15
If a Mod 6 = 0 Then
xRowIndex = 14
xColIndex = xColIndex + 38
End If
Else
xColIndex = xColIndex + 18
End If
a = a + 1
Next
End If
End Sub