Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub UpdateRandomNumber(oSh As Shape)
- Dim X As Long
- 'Make the shape’s text generate a random number less than or equal to the value of X
- X = 16
- oSh.TextFrame.TextRange.Text = CStr(Random(X))
- 'The below forces the PowerPoint to refresh the slide so that the dice is rerolled
- SlideShowWindows(1).View.GotoSlide (SlideShowWindows(1).View.Slide.SlideIndex)
- End Sub
- Function Random(High As Long) As Long
- 'Generates a random number less than or equal to the number X identified above
- Randomize
- Random = Int((High * Rnd) + 1)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement