muhammad susanto
Well-known Member
- Joined
- Jan 8, 2013
- Messages
- 2,089
- Office Version
- 365
- 2021
- Platform
- Windows
hello word...
the code below work properly for insert pictures from a folder ..i just want to set margin top, bottom, left, right in a cell..i want to the picture not "fill full" a cell
here the code :
how to adding or set width and height like (2 * cBorder), etc......
related cross post
any helps, thank in advance..
.sst
the code below work properly for insert pictures from a folder ..i just want to set margin top, bottom, left, right in a cell..i want to the picture not "fill full" a cell
here the 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
related cross post
VBA Insert Picture Fully Filed in A Cellhi all... the code below work properly..i just want to set margin top, bottom, left, right in a cell..i want to the picture not "fill full" a cell Sub InsertPicture() Dim sPicture As String, pic As Picture sPicture = Application.GetOpenFilename _ ("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif...
www.mrexcel.com
|
any helps, thank in advance..
.sst