Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get Image to cell in excel from URL; Convert image URL to actual image in excel; Powered by Imam Uddin; imamuddinwp.
Sub Excel_Download_Image_From_URL()
'Proudly Powered by Imam Uddin
Dim Pshp As Shape
Dim xRg As Range
Dim xCol As Long
On Error Resume Next
Application.ScreenUpdating = False
'Set rng = ActiveSheet.Range("A2:A140")
Set rng = ActiveSheet.Range("A3", ActiveSheet.Range("A3").End(xlDown))
For Each cell In rng
filenam = cell
Set Pshp = Selection.ShapeRange.Item(1)
Pshp.Placement = xlMoveAndSize
If Pshp Is Nothing Then GoTo lab
xCol = cell.Column + 1
Set xRg = Cells(cell.Row, xCol)
With Pshp
.LockAspectRatio = msoFalse
.Width = 120
.Height = 60
.Top = xRg.Top + (xRg.Height - .Height) / 2
.Left = xRg.Left + (xRg.Width - .Width) / 2
End With
Set Pshp = Nothing
Application.ScreenUpdating = True
End Sub
Copy link

imamuddinwp commented Apr 26, 2021

"excel vba download image from url"
"download images from url list excel"
"how to hyperlink image in excel"
"excel hyperlink image formula"
"excel vba get image from website"
"excel vba insert image from url"
"access vba download image from url"
"excel image function"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment