Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CDG
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

how to do it?
  #2   Report Post  
Posted to microsoft.public.excel.misc
kassie
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

In your dreams mate

"CDG" wrote:

how to do it?

  #3   Report Post  
Posted to microsoft.public.excel.misc
CDG
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

thank you very much

"kassie" wrote:

In your dreams mate

"CDG" wrote:

how to do it?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

Maybe John Walkenbach's instructions will help:
http://www.j-walk.com/ss/excel/tips/tip87.htm

CDG wrote:

how to do it?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default 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?



  #6   Report Post  
Posted to microsoft.public.excel.misc
CDG
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

thanks m8


"Dave Peterson" wrote:

Maybe John Walkenbach's instructions will help:
http://www.j-walk.com/ss/excel/tips/tip87.htm

CDG wrote:

how to do it?


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default adding sound to an excel i.e. warning if data is negative

?B?R2FyeScncyBTdHVkZW50?= wrote

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.


I couldn't get it to work in XL2000 (error 438), but some searching allowed
me to adapt:

Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim s As Object
Set s = CreateObject("SAPI.SpVoice")
If Intersect(Range("A1:A10"), Target) Is Nothing Then GoTo ws_exit
Application.EnableEvents = False
If Target.Value < 0 Then
s.Speak "warning,, negative value" 'dbl commas introduce a pause
End If
ws_exit:
Set s = Nothing
Application.EnableEvents = True
End Sub

--
David
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I copy a table from Word into one cell in Excel without losing data? (Office 97) [email protected] Excel Discussion (Misc queries) 2 November 29th 05 07:22 PM
How do I import formmail data to a custom excel template? cxlough41 Excel Worksheet Functions 1 July 1st 05 12:59 AM
Append the data given in diff sheets of an Excel File to one sheet sansk_23 Excel Worksheet Functions 3 May 10th 05 02:00 AM
Getting Excel Data from One Sheet to Another.... Robin Excel Discussion (Misc queries) 2 April 21st 05 01:15 PM
How can deleted data reappear in a refreshed pivot table in Excel excel_user123456 Excel Discussion (Misc queries) 3 February 23rd 05 08:34 PM


All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"