muhammad susanto
Well-known Member
- Joined
- Jan 8, 2013
- Messages
- 2,089
- Office Version
- 365
- 2021
- Platform
- Windows
hi expert..
i have macro code to extract photo from a folder..the code actually working well in a single cell down.
i hope someone can modify that code can work to extract photo for double cell or couple photo down
here code
i attach picture from detail information
thank for your help..
.sst
i have macro code to extract photo from a folder..the code actually working well in a single cell down.
i hope someone can modify that code can work to extract photo for double cell or couple photo down
here code
VBA Code:
Sub InsertPictures()
'Update 20140513
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
i attach picture from detail information
thank for your help..
.sst