Forum Discussion
LizeMarie
Dec 08, 2022Brass Contributor
Load Image/Picture to cell Range using image path C:\
I need help please - I search on google without a solution. For some reason my Microsoft 365 don't have the Image function. I have a path to an image in range Sheet1.Range("G1") e.g., C:\Users........
HansVogelaar
Dec 08, 2022MVP
You can use code like this:
Dim rng As Range
Set rng = Sheet2.Range("K8")
Sheet2.Activate
rng.Select
With Sheet2.Pictures.Insert(Sheet1.Range("G1").Value)
.Width = rng.Width
.Height = rng.Height
End With
- LizeMarieDec 08, 2022Brass ContributorThank you so much Hans it works! Yeah!
The range are merged cells, how can I change the width and height accordingly Height must be 30.03 cm and width 3.24 cm
Thank you again Hans - I struggled with this for more than 2 days' 🙂 Highly appreciate your reply- HansVogelaarDec 08, 2022MVP
That would be
Dim rng As Range Set rng = Sheet2.Range("K8") Sheet2.Activate rng.Select With Sheet2.Pictures.Insert(Sheet1.Range("G1").Value) .Width = Application.CentimetersToPoints(3.24) .Height = Application.CentimetersToPoints(30.03) End With
- LizeMarieDec 08, 2022Brass ContributorI made a mistake with the Hight, but I can change it myself.
OMW Hans, you don't know how much I appreciate this. Thank you so much! Be blessed and have a wonderful day