Hello everyone
I wrote a code to reposition images in the PPT slide by selecting from a list.
To select from a list I use Combo box.
The problem is that I get the error after I select from the list.
I would appreciate if anyone could help me.
Below is the code:
Private Sub ComboBox1_Change()
ComboBox1.List = Array("Increase", "Reduction", "No change", "Empty")
ComboBox1.ListRows = 4
If ComboBox1.Value = "Reduction" Then
ActivePresentation.Slides(1).Shapes.Range(Array("Wshape")).Select
Selection.ShapeRange.ZOrder msoBringToFront
ActivePresentation.Slides(1).Shapes.Range(Array("neutral")).Select
Selection.ShapeRange.ZOrder msoBringToFront
End If
If ComboBox1.Value = "Empty" Then
ActivePresentation.Slides(1).Shapes.Range(Array("Wshape")).Select
Selection.ShapeRange.ZOrder msoBringToFront
ActivePresentation.Slides(1).Shapes.Range(Array("Wshape")).Select
Selection.ShapeRange.ZOrder msoBringToFront
End If
If ComboBox1.Value = "No change" Then
ActivePresentation.Slides(1).Shapes.Range(Array("Wshape")).Select
Selection.ShapeRange.ZOrder msoBringToFront
ActivePresentation.Slides(1).Shapes.Range(Array("MEDIUM")).Select
Selection.ShapeRange.ZOrder msoBringToFront
End If
If ComboBox1 = "Increase" Then
ActivePresentation.Slides(1).Shapes.Range(Array("Wshape")).Select
Selection.ShapeRange.ZOrder msoBringToFront
ActivePresentation.Slides(1).Shapes.Range(Array("HIGH")).Select
Selection.ShapeRange.ZOrder msoBringToFront
End If
End Sub
Bookmarks