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!
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