Bonjour
job75
As-tu la possibilité de mettre directement l'association des 2 macros dans ta réponse afin que vois ce qu'il faut faire ?
Pour playsound elle fonctionnait très bien toute seule à partir du moment ou je mettais le son dans le même dossier. J'ai essayé de mettre l'adresse en remplacement mais cela ne fonctionne pas.
ci-dessous mes modifs :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim isect, Z$, plage
If Target.Count = 1 Then
Z = Target.Value
plage = "h18"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "j18"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "Q24:Q43"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "R24:R43"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "S24:S43"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "Q45:Q48"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "R45:R48"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
plage = "S45:S48"
Set isect = Application.Intersect(Target, Range(plage))
If Not isect Is Nothing Then
Target.Value = IIf(Z = "", "ü", "")
End If
End If
If Target.Address = Range("a1").Address And Range("a1").Value > 10 Then
Dim I
For I = 1 To 3 ' Loop 3 times.
PlaySound "W:\EUFR\POUZ\$DATA\GRP-OPERATIONNEL\FAB\0257.wav"
MsgBox "Attention valeur hors tolérance"
Next I
End If
line:
Exit Sub
End Sub