How to insert multiple pictures and resize them at once in Excel


In this tutorial, you will learn How to insert multiple pictures selected cells in Microsoft Excel. How to insert multiple pictures and resize them at once in Excel. In the totality of this tutorial, I have made a video. By watching the video, you can do the work in a much easier way. So don’t delay, watch the video below now. In this tutorial, we use a VBA code. I have given the code below:-

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


© 2020 Tanvir Academy. All rights reserved. DESIGN & DEVELOP BY ~ Soft IT Care
X