Excel is your new Fitness Coach 💪😀

Опубликовано: 07 Апрель 2020
на канале: Excel Exercice
3,728
112

'Copy this code in a new Excel workbook and then you have to follow your new coach 😉
'#staysafe #stayhome #dosports

' If you want to avoid 2 times the same number in a row, you will find the code here
'https://www.excel-exercise.com/excel-...

'***** Code *********
' ==== START COPY HERE ======
Sub Sport()
Dim i As Long
Dim RndNumber As Long
Dim TextNumber As String
Dim MaxCatch As Long
MaxCatch = 10 'Change this value if you want more numbers
Application.Speech.Speak "Ready?"
Application.Wait (Now + TimeValue("00:00:02"))
Application.Speech.Speak "Go"
For i = 1 To MaxCatch
Randomize
If i = MaxCatch Then
Application.Speech.Speak "Last One"
End If
RndNumber = Int(Rnd() * 4) + 1 ' Generate a random number between 1 and 4
TextNumber = Application.WorksheetFunction.Choose(RndNumber, "one", "two", "three", "four")
Application.Speech.Speak TextNumber
Application.Wait (Now + TimeValue("00:00:01"))
Next
End Sub
' ===== END COPY =====


Смотрите видео Excel is your new Fitness Coach 💪😀 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Excel Exercice 07 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,728 раз и оно понравилось 112 людям.