Sub Form_DatapointChanged(ByVal DP As Object, ByVal prop As String) If DP.AlarmState = Asc("A") And prop = "AlarmState" Then If DP.Name = "Alarm" Then Application.PlaySound "alarm.wav", &H00020001 ' oder &H00020009 für Endloswiederholung ElseIf DP.Name = "Alarm2" Then Application.PlaySound "xyz.wav", &H00020001 End If End If End Sub