Hi, two questions.
- How do I insert the pictures via hyperlink, as an object so someone external can view the pictures. I tried to modify it but it returning a " ... End With" error.
- Also, can I change this script to designate which column to insert the photos into? For example, I want to insert the pictures in column A.
VBA Code:
Sub InstallPictures()
Dim i As Long, v As String, Pic
On Error Resume Next
For i = 1 To 1903
v = Cells(i, "G").Value
If v = "" Then Exit Sub
Set Pic = ActiveSheet.Pictures.Insert(v)
With Pic
.LockAspectRatio = msoFalse
.Width = 100
.Height = 100
.Left = Cells(i, "h").Left + Cells(i, "h").Left.Width / 2 - .Width / 2
.Top = Cells(i, "h").Top + Cells(i, "h").Height / 2 - .Height / 2
End With
Next i
On Error GoTo 0
End Sub