INSERT PICTURES & AUTO RESIZE WITH SELECTED CELLS (EXCEL VBA)

preview_player
Показать описание
Subscribe for more Video
Leave a Comment Thanks For Watching My Videos

===============================================================
Function xAddImg(xRng, RightDown)
Set xPth = xFolder
For x = 1 To xPth.Count
Set Sh = ActiveSheet.Shapes.AddPicture(xPth(x), True, True, 100, 100, 100, 100)
With Sh
.Left = xRng.Left
.Top = xRng.Top
If RightDown = 1 Then
.Top = xRng.Top - xRng.Height + xRng.Height * x
ElseIf RightDown > 1 Then
.Left = xRng.Left - xRng.Width + xRng.Width * x
End If
.Width = xRng.Width
.Height = xRng.Height
End With
Next
Set xPth = Nothing
xAddImg = "OK"
End Function

Function xFolder()
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = True
.ButtonName = "Insert"
.Filters.Clear
.Filters.Add "All files", "*.*"
.Filters.Add "Images", "*.png; *.jpg ; *.gif ; *.bmp; *.ico; *.jfif"
.FilterIndex = 2
If Not .Show = 0 Then
Set xFolder = .SelectedItems
Else
Exit Function
End If
End With
End Function
==================================================================

Insert Picture and Resize Excel (Add-ins)
Create Calendar With Easy Step
Auto Send Excel File To Wechat By Excel VBA
Рекомендации по теме