XL 2019 Emission d'un bip

valouf

XLDnaute Junior
Bonsoir j'aimerais avoir un bip au chiffre voulue merci d'avance
 

Pièces jointes

  • emission d'un bip.xlsm
    16.5 KB · Affichages: 8

patricktoulon

XLDnaute Barbatruc
bonjour
VB:
Sub DecompteMN()
    With Sheets("travail")
        If IsNumeric(.[B9]) Then
            If .[B9] > 0 Then
                .[e4] = .[B9]

                Do While .[e4] > 0
                    Application.Wait Now + TimeValue("0:0:1")
                    With .[e4]
                        .Value = .value - 1
                        If .Value = 200 Then Beep
                        If .Value = 400 Then Call arret("Vous êtes de passage à nantes")
                    End With
                Loop
            End If
        End If
        Call arret("Vous êtes arrivé")
    End With
End Sub
Sub arret(vocal)
    Application.Speech.Speak vocal, 1
End Sub
@+ ;)
 

valouf

XLDnaute Junior
Bonjour,
En B9 mettre 200,
Dans un module,
VB:
Sub test()
If sheets(1).range("B9") = 200 then beep
End sub
A +
Bonjour,
En B9 mettre 200,
Dans un module,
VB:
Sub test()
If sheets(1).range("B9") = 200 then beep
End sub
A +
MERCI pour vos reponses c gentil mais je n'y arrive pas pas assez bon sur visual basic