PPT用宏代码实现隐藏指定幻灯片功能
请问如何在PPT中用宏隐藏指定的幻灯片?例如:一PPT共20页,第1页中有两个按钮,幻灯片处于放映模式时,选中按钮1则隐藏第4、7、8页,选择按钮2则隐藏第3、5、6页. 提前叩谢! 这个查帮助就可以了。帮你贴出代码如下:Private Sub CommandButton1_Click() '按钮1
With ActivePresentation
.Slides(3).SlideShowTransition.Hidden = msoFalse
.Slides(5).SlideShowTransition.Hidden = msoFalse
.Slides(6).SlideShowTransition.Hidden = msoFalse
.Slides(4).SlideShowTransition.Hidden = msoTrue
.Slides(7).SlideShowTransition.Hidden = msoTrue
.Slides(8).SlideShowTransition.Hidden = msoTrue
End With
End Sub
Private Sub CommandButton2_Click()'按钮2
With ActivePresentation
.Slides(4).SlideShowTransition.Hidden = msoFalse
.Slides(7).SlideShowTransition.Hidden = msoFalse
.Slides(8).SlideShowTransition.Hidden = msoFalse
.Slides(3).SlideShowTransition.Hidden = msoTrue
.Slides(5).SlideShowTransition.Hidden = msoTrue
.Slides(6).SlideShowTransition.Hidden = msoTrue
End With
End Sub 非常感谢,英雄! 谢谢laose兄的分享!
页:
[1]