Bonjour à tous,
Sauriez-vous comment je peux intégrer 2 worksheet dans une même feuille ?
1ière macro
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
End Sub
2ième macro
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo line
If Target.Address = Range("d19").Address And Range("d19").Value > 10 Then
Dim I
For I = 1 To 3 ' Loop 3 times.
PlaySound ThisWorkbook.Path & "\0257", 0, 1
MsgBox "Attention valeur hors tolérance"
Next I
End If
line:
Exit Sub
End Sub
Je bute depuis plusieurs heures même en allant sur les forums (sachant que je suis pas expert dans les macros)
Merci d'avance pour votre aide^^