Help with MAC excel!! Cannot show URL pic

Joined
May 17, 2017
Messages
1
Reaction score
0
Points
1
I hope someone can help me!

I am trying to display some pictures in excel by retreiving URL. I have many so called Macros expert do it but i still does't work.

everytime i execute the script it ends up empty.

here is the code, can someone pls help? is it because its a MAC version?

Sub IMAGE_V1()
Dim Rng As Range
Dim Cell As Range
Dim Pic As Picture

Rows("2:" & Range("A" & Rows.Count).End(xlUp).Row).RowHeight = 101.25
Columns("O:p").ColumnWidth = 36.57
Application.ScreenUpdating = False

Set Rng = Range("M2:M" & Range("A" & Rows.Count).End(xlUp).Row)
For Each Cell In Rng
With Cell
On Error Resume Next
Set Pic = .Parent.Pictures.Insert(.Value)
If Err <> 0 Then
Err.Clear
Else
With .Offset(, 2)
Pic.Top = .Top
Pic.Left = .Left
Pic.Height = .Height
Pic.Width = .Width
End With
End If
On Error GoTo 0
End With
Next Cell

'Application.ScreenUpdating = True
End Sub

Sub IMAGE_V2()
Dim Rng As Range
Dim Cell As Range
Dim Pic As Picture

'Rows("2:" & Range("AA" & Rows.Count).End(xlUp).Row).RowHeight = 101.25
'Columns("AC:AD").ColumnWidth = 36.57
'Application.ScreenUpdating = False

Set Rng = Range("N2:N" & Range("A" & Rows.Count).End(xlUp).Row)
For Each Cell In Rng
With Cell
On Error Resume Next
Set Pic = .Parent.Pictures.Insert(.Value)
If Err <> 0 Then
Err.Clear
Else
With .Offset(, 2)
Pic.Top = .Top
Pic.Left = .Left
Pic.Height = .Height
Pic.Width = .Width
End With
End If
On Error GoTo 0
End With
Next Cell

Application.ScreenUpdating = True
End Sub
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top