Header

Header

How to Insert Multiple Pictures and Resize them at once in Excel.

 


How to Insert Multiple Pictures and Resize them at once in Excel.



In this Video,You will Learn How to insert Muliple Pictures selected cells in Microsoft Excel.

How to insert multiple Muliple Pictures selected cells in Microsoft Excel.

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

1 comment:

Powered by Blogger.