Hi
I am returning to the forum after a long absence. I no longer use excel regularly now I am retired.
I am researching genealogy and need to scrape a list of images (Plus 2000) I have listed them in a column (A) in excel and have tried a number of solutions from the web, the latest being:
This is the one that got me closest. However, all it does is insert a rectangle shape in column B but no image.
An example of the link I am using is Genealogy Image.
This forum has always been very helpful and I hope that someone might come to my rescue. Appreciate any help given.
Martin
I am returning to the forum after a long absence. I no longer use excel regularly now I am retired.
I am researching genealogy and need to scrape a list of images (Plus 2000) I have listed them in a column (A) in excel and have tried a number of solutions from the web, the latest being:
VBA Code:
Sub URLPictureInsert()
Dim Pshp As Shape
Dim xRg As Range
Dim xCol As Long
On Error Resume Next
Application.ScreenUpdating = False
Set Rng = ActiveSheet.Range("A1:A3")
For Each cell In Rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set Pshp = Selection.ShapeRange.Item(1)
If Pshp Is Nothing Then GoTo lab
xCol = cell.Column + 1
Set xRg = Cells(cell.Row, xCol)
With Pshp
.LockAspectRatio = msoFalse
If .Width > xRg.Width Then .Width = xRg.Width * 2 / 3
If .Height > xRg.Height Then .Height = xRg.Height * 2 / 3
.Top = xRg.Top + (xRg.Height - .Height) / 2
.Left = xRg.Left + (xRg.Width - .Width) / 2
End With
lab:
Set Pshp = Nothing
Range("A2").Select
Next
Application.ScreenUpdating = True
End Sub
This is the one that got me closest. However, all it does is insert a rectangle shape in column B but no image.
An example of the link I am using is Genealogy Image.
This forum has always been very helpful and I hope that someone might come to my rescue. Appreciate any help given.
Martin