Hi Poul
Thanks for your code works perfectly. And now I dont have to write the same code over and over again for each button.
I have another one simular.
I have some nav buttons that have to be active when some others have to be muted. each button will show a picture of a platform.
Here I am challenged to make alle the other pictures and buttons disappear every time one button is clicked.
I can make it work with this code: (but it seems very complicated)
---
Sub pltA_Click()
'pic to show
ActivePresentation.Slides(1).Shapes("pltA").Visible = True
ActivePresentation.Slides(1).Shapes("knapA").ShapeStyle = msoShapeStylePreset40
ActivePresentation.Slides(1).Shapes("knapA").TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
ActivePresentation.Slides(1).Shapes("knapB").ShapeStyle = msoShapeStylePreset41
ActivePresentation.Slides(1).Shapes("knapB").TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
ActivePresentation.Slides(1).Shapes("knapC").ShapeStyle = msoShapeStylePreset41
ActivePresentation.Slides(1).Shapes("knapC").TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
ActivePresentation.Slides(1).Shapes("knapD").ShapeStyle = msoShapeStylePreset41
ActivePresentation.Slides(1).Shapes("knapD").TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
ActivePresentation.Slides(1).Shapes("knapE").ShapeStyle = msoShapeStylePreset41
ActivePresentation.Slides(1).Shapes("knapE").TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
'additional to show
ActivePresentation.Slides(1).Shapes("knapAC").Visible = True
ActivePresentation.Slides(1).Shapes("knapA1").Visible = True
ActivePresentation.Slides(1).Shapes("knapA2").Visible = True
ActivePresentation.Slides(1).Shapes("knapA3").Visible = True
'knap NOT show
ActivePresentation.Slides(1).Shapes("knapBC").Visible = False
ActivePresentation.Slides(1).Shapes("knapB1").Visible = False
ActivePresentation.Slides(1).Shapes("knapB2").Visible = False
ActivePresentation.Slides(1).Shapes("knapB3").Visible = False
ActivePresentation.Slides(1).Shapes("knapB4").Visible = False
ActivePresentation.Slides(1).Shapes("knapB5").Visible = False
ActivePresentation.Slides(1).Shapes("knapCC").Visible = False
ActivePresentation.Slides(1).Shapes("knapC1").Visible = False
ActivePresentation.Slides(1).Shapes("knapDC").Visible = False
ActivePresentation.Slides(1).Shapes("knapD1").Visible = False
ActivePresentation.Slides(1).Shapes("knapEC").Visible = False
ActivePresentation.Slides(1).Shapes("knapE1").Visible = False
ActivePresentation.Slides(1).Shapes("knapE2").Visible = False
ActivePresentation.Slides(1).Shapes("knapE3").Visible = False
'Platform pic NOT show
ActivePresentation.Slides(1).Shapes("pltB").Visible = False
ActivePresentation.Slides(1).Shapes("pltC").Visible = False
ActivePresentation.Slides(1).Shapes("pltD").Visible = False
ActivePresentation.Slides(1).Shapes("pltE").Visible = False
'Level pic NOT show
ActivePresentation.Slides(1).Shapes("levelAC").Visible = False
ActivePresentation.Slides(1).Shapes("levelA1").Visible = False
ActivePresentation.Slides(1).Shapes("levelA2").Visible = False
ActivePresentation.Slides(1).Shapes("levelA3").Visible = False
'ActivePresentation.Slides(1).Shapes("levelBC").Visible = False
'ActivePresentation.Slides(1).Shapes("levelB1").Visible = False
'ActivePresentation.Slides(1).Shapes("levelB2").Visible = False
'ActivePresentation.Slides(1).Shapes("levelB3").Visible = False
'ActivePresentation.Slides(1).Shapes("levelB4").Visible = False
'ActivePresentation.Slides(1).Shapes("levelB5").Visible = False
ActivePresentation.Slides(1).Shapes("levelCC").Visible = False
ActivePresentation.Slides(1).Shapes("levelC1").Visible = False
ActivePresentation.Slides(1).Shapes("levelDC").Visible = False
ActivePresentation.Slides(1).Shapes("levelD1").Visible = False
'ActivePresentation.Slides(1).Shapes("levelEC").Visible = False
'ActivePresentation.Slides(1).Shapes("levelE1").Visible = False
'ActivePresentation.Slides(1).Shapes("levelE2").Visible = False
'ActivePresentation.Slides(1).Shapes("levelE3").Visible = False
End Sub
---
Udklip.JPG
Hope you can assist with a easier way.
regards Jesper