Dim Length, Width
Private Sub CommandButton1_Click()
'New Problem
Length = Int((15 - 8 + 1) * Rnd + 8)
Width = Int((3 - 7 + 1) * Rnd + 6)
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
20").Visible = msoFalse
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
21").Visible = msoFalse
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
20").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
21").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Label1").TextFrame.DeleteText
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Label2").TextFrame.DeleteText
Label1.Caption = Length
Label2.Caption = Width
End Sub
Private Sub CommandButton2_Click()
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.TextRange.Text = "Answer"
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.TextRange.Text = "Gallons"
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.TextRange _
.Text = Format((((Label1.Caption) * 7.5 * 0.785 * (Label2.Caption) *
(Label2.Caption)) / 1728), "0.###")
'Answer Box
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.TextRange.Font.Bold = True
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.TextRange.Font.Name = "Arial"
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.TextRange.Font.Size = 24
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
24").TextFrame.TextRange.Font.Color.RGB = vbBlue
'Correct Answer
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.TextRange.Font.Bold = True
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.TextRange.Font.Name = "Arial"
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.TextRange.Font.Size = 24
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
28").TextFrame.TextRange.Font.Color.RGB = vbBlue
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.TextRange.Font.Bold = True
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.TextRange.Font.Name = "Arial"
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.TextRange.Font.Size = 24
ActivePresentation.SlideShowWindow.View.Slide.Shapes("Text Box
30").TextFrame.TextRange.Font.Color.RGB = vbBlue
End Sub