我已经在下面编写了代码,但是它不起作用。有人可以为我指出错误吗?
Private Sub CommandButton1_click()
If Slide1.m.Text = g Then
ActivePresentation.SlideShowWindow.View.GotoSlide 3
ElseIf Slide1.m.Text = h Then
ActivePresentation.SlideShowWindow.View.GotoSlide 4
Else
ActivePresentation.SlideShowWindow.View.GotoSlide 1
End If
End Sub
答案 0 :(得分:0)
根据我上面的评论,您在if
语句中缺少引号。
Private Sub CommandButton1_click()
If Slide1.m.Text = "g" Then
ActivePresentation.SlideShowWindow.View.GotoSlide 3
ElseIf Slide1.m.Text = "h" Then
ActivePresentation.SlideShowWindow.View.GotoSlide 4
Else
ActivePresentation.SlideShowWindow.View.GotoSlide 1
End If
End Sub