Shape fill from URL fails on Mac Excel 2011

L

Legacy 361036

Guest
Hi!


I have a dashboard that brings in photos depending on the month selected from a drop down list. I have tested it on PC Excel 2013 and Mac Excel 2015 and it works perfectly. However one person I sent it to says it is not working on Mac Excel 2011. After they change the month on the drop down, all the dynamic numbers go blank and the photos don't change and they get a shape fill error. I don't have access to a Mac with Excel 2011 and I haven't had the chance to further question them about the errors. All I can suppose is that the error occurs at the bolded line below.



Thank you!


Code:
Sub Worksheet_Calculate()
    
    ' declares shapes
    Dim shp1 As Shape, shp2 As Shape, shp3 As Shape
    
    ' sets picture URL source sheet
    Set shSource = ThisWorkbook.Sheets("Album")
    Set shDestination = ThisWorkbook.Sheets("Main")
    
    
    ' sets shapes according to shape names
    Set shp1 = shDestination.Shapes("ScottIG_Photo1")
    Set shp2 = shDestination.Shapes("ScottIG_Photo2")
    Set shp3 = shDestination.Shapes("ScottIG_Photo3")
   


    ' fills the background with a picture
    [B]shp1.Fill.UserPicture (shSource.Range("b3"))[/B]
    shp2.Fill.UserPicture (shSource.Range("j3"))
    shp3.Fill.UserPicture (shSource.Range("r3"))
     
End Sub
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Watch MrExcel Video

Forum statistics

Threads
1,122,514
Messages
5,596,612
Members
414,080
Latest member
penguin23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top