P
Preschool Mike
Is it possible to adjust the following code so the countdown displays in a
clock format (e.g., 2:00 for two minutes). It currently displays one minutes
as 60 , two minutes as 120 and so on.
Public StopNow As Boolean
Dim GameTime As Integer
Dim userName As String
Sub EnterTime()
YourName 'player enters their name
GameTime = InputBox("Set the game time") ' player enters amount of time they
think they can beat the game. Currently entered as 60 for one minute.
ActivePresentation.SlideShowWindow.View.Next
CountDown 'countdown starts
End Sub
Sub Wait(waitTime As Long)
Dim start As Double
start = Timer
While Timer < start + waitTime
If StopNow Then
Exit Sub
Else
DoEvents
End If
Wend
End Sub
Sub CountDown()
Dim X As Long
StopNow = False
For X = GameTime To 0 Step -1
If Not StopNow Then
ActivePresentation.SlideMaster.Shapes("Timebox").TextFrame.TextRange.Text =
CStr(X)
Wait (1)
End If
Next
If Not StopNow Then
MsgBox ("You're out of time!")
End If
End Sub
clock format (e.g., 2:00 for two minutes). It currently displays one minutes
as 60 , two minutes as 120 and so on.
Public StopNow As Boolean
Dim GameTime As Integer
Dim userName As String
Sub EnterTime()
YourName 'player enters their name
GameTime = InputBox("Set the game time") ' player enters amount of time they
think they can beat the game. Currently entered as 60 for one minute.
ActivePresentation.SlideShowWindow.View.Next
CountDown 'countdown starts
End Sub
Sub Wait(waitTime As Long)
Dim start As Double
start = Timer
While Timer < start + waitTime
If StopNow Then
Exit Sub
Else
DoEvents
End If
Wend
End Sub
Sub CountDown()
Dim X As Long
StopNow = False
For X = GameTime To 0 Step -1
If Not StopNow Then
ActivePresentation.SlideMaster.Shapes("Timebox").TextFrame.TextRange.Text =
CStr(X)
Wait (1)
End If
Next
If Not StopNow Then
MsgBox ("You're out of time!")
End If
End Sub