Код: Выделить всё
Private Sub Worksheet_Calculate()
End Sub
Модератор: Naeel Maqsudov
Код: Выделить всё
Private Sub Worksheet_Calculate()
End Sub
Код: Выделить всё
Option Explicit
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" ( _
ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
Private Sub Play()
PlaySound "c:\temp\chimes.wav", 0&, &H1
End Sub
Private Sub Worksheet_Calculate()
If [A1].Value > [B1].Value Then Play
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If (Target = [A1]) Then
If [A1].Value > [B1].Value Then Play
End If
End Sub