adding sound to an excel i.e. warning if data is negative
Enter this macro in worksheet code:
Sub Worksheet_Change(ByVal Target As Excel.Range)
' gsnu
If Intersect(Range("A1:A10"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Value < 0 Then
s = "warning negative value"
Application.Speech.Speak s
End If
Application.EnableEvents = True
End Sub
The routine checks entries in A1 thru A10. If the entries are negative, a
warning is issued.
Just be sure to put the code in worksheet code, not a module.
--
Gary's Student
"CDG" wrote:
thank you very much
"kassie" wrote:
In your dreams mate
"CDG" wrote:
how to do it?
|