Hello,
I'm trying to set up a marco to insert images into certain cells for reporting needs.
This is the format :
This is what I got so far (all credits to Google search), the macro pulls in the images into cells, but not in a range of cells (necessary) and I can only put them next to each other.
Thank you for helping me out!
I'm trying to set up a marco to insert images into certain cells for reporting needs.
This is the format :

This is what I got so far (all credits to Google search), the macro pulls in the images into cells, but not in a range of cells (necessary) and I can only put them next to each other.
Code:
Sub InsertPictures()
Dim PicList() As Variant
Dim PicFormat As String
Dim Rng As Range
Dim sShape As Shape
On Error Resume Next
PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
xColIndex = Application.ActiveCell.Column
If IsArray(PicList) Then
xRowIndex = Application.ActiveCell.Row
For lLoop = LBound(PicList) To UBound(PicList)
Set Rng = Cells(xRowIndex, xColIndex)
Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
xRowIndex = xRowIndex + 1
Next
End If
End Sub
Thank you for helping me out!