hunter21188
12-04-2015, 11:29 AM
Hey y'all,
I have an image placeholder in a slide, and I am trying to change this image based on what is selected by the user. This is what I have currently, but it is not working:
Private Sub MainImage()
If ComboBox2 = "Second Image" Then
ActiveWindow.Selection.SlideRange.Shapes("MainImage").Fill.UserPicture ("J:\image.png")
End If
End Sub
This code works fine if I use an actual shape as a placeholder, so I assume the ".Shape()" part may be wrong? Any help is greatly appreciated!
Thanks!
I have an image placeholder in a slide, and I am trying to change this image based on what is selected by the user. This is what I have currently, but it is not working:
Private Sub MainImage()
If ComboBox2 = "Second Image" Then
ActiveWindow.Selection.SlideRange.Shapes("MainImage").Fill.UserPicture ("J:\image.png")
End If
End Sub
This code works fine if I use an actual shape as a placeholder, so I assume the ".Shape()" part may be wrong? Any help is greatly appreciated!
Thanks!