Inserting pictures
Closed
Hello,
Please I need help,
I want to insert pictures into a particular sheet remotely without opening the sheet.
And the picture will be base in a certain names stored in a range from another sheet.
Each picture in the folder will carry a unique name store in the cells.
With the click of button the pictures will be inserted automatically all at the same time.
I've view different code but none meet my test.
Expect response soon
My best regards
Please I need help,
I want to insert pictures into a particular sheet remotely without opening the sheet.
And the picture will be base in a certain names stored in a range from another sheet.
Each picture in the folder will carry a unique name store in the cells.
With the click of button the pictures will be inserted automatically all at the same time.
I've view different code but none meet my test.
Expect response soon
My best regards
System Configuration: Android / Chrome 65.0.3325.109
Related:
- Inserting pictures
- How to auto save pictures in messenger - Guide
- How to rotate multiple pictures at once windows 10 - Guide
- How to make a video with pictures on windows media player - Guide
- Offline pictures for whatsapp - Guide
- Fake tinder pictures - Home - Apps & Sites
Feb 16, 2019 at 03:16 PM
What it does is to insert the picture from the folder.
But I want this picture to be inserted is a certain cell in another worksheet.
Is it possible?
Please I need your help,
God bless!!
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range) 'Excel VBA procedure to incorporate Pictures from folder.
Dim rng As Range
Set rng=Application.Intersect(Range("A10:A20"), Target.Cells(1, 1))
If rng Is Nothing Then Exit Sub
GetPicture rng
End Sub
Sub GetPicture(r As Range)
Dim fName As String
Dim s As String
fName="C:\Users\HYMC\Pictures\" & r & ".jpg" 'Change to suit.
s="B" & r.Row
r.RowHeight=75 'pixels
On Error Resume Next
ActiveSheet.Pictures(s).Delete 'Delete the picture
Set pic=ActiveSheet.Pictures.Insert(fName)
On Error GoTo 0
If Not IsEmpty(pic) Then
With pic 'Resize the picture with VBA
.Height=75
.Width=75
.Left=Range(s).Left
.Top=Range(s).Top
.Name=s
End With
End If
End Sub