Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
hi
ive been trying for a while now to get the text to speech function to work for a particular cell. For example, i have a set of numbers and a total in D15, what i would like is that if i change the numbers that contribute to that total, and the total in D15 changes then excel will alert me saying "Change in Total". ive tried and failed to get it notice the changed total and would really appreciate some help Thank You for any contributions |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Let's put the message in a cell, say D16.
In a standard module insert the follow line: Public OldVar As Variant Insert the following event macro in the worksheet code area: Private Sub Worksheet_Calculate() If OldVar = Range("B15").Value Then Exit Sub Range("B16").Speak OldVar = Range("B15").Value End Sub Insert the following macro in the workbook code area: Private Sub Workbook_Open() OldVar = Sheets("Sheet1").Range("B15").Value End Sub -- Gary''s Student - gsnu200817 |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thank you very much
Just a further question, if i wanted to add more cells how could i do that? im thinking of being crude and just using the same code repeatedly, changing the cell. However ive tried that, but i know im not doing it right, i dont know if i have to do it in the same worksheet or not, and if so then how do i avoid the "ambiguous name detected" error. As you can tell im very new to VBA Once again, thanks for any help "Gary''s Student" wrote: Let's put the message in a cell, say D16. In a standard module insert the follow line: Public OldVar As Variant Insert the following event macro in the worksheet code area: Private Sub Worksheet_Calculate() If OldVar = Range("B15").Value Then Exit Sub Range("B16").Speak OldVar = Range("B15").Value End Sub Insert the following macro in the workbook code area: Private Sub Workbook_Open() OldVar = Sheets("Sheet1").Range("B15").Value End Sub -- Gary''s Student - gsnu200817 |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
You cannot replicate the subs. There can only be one sub of each type on
each worksheet/workbook. You would need to use arrays within the subs to trap the different cells that must be monitored. -- Gary''s Student - gsnu200817 "FunkyAnt13" wrote: Thank you very much Just a further question, if i wanted to add more cells how could i do that? im thinking of being crude and just using the same code repeatedly, changing the cell. However ive tried that, but i know im not doing it right, i dont know if i have to do it in the same worksheet or not, and if so then how do i avoid the "ambiguous name detected" error. As you can tell im very new to VBA Once again, thanks for any help "Gary''s Student" wrote: Let's put the message in a cell, say D16. In a standard module insert the follow line: Public OldVar As Variant Insert the following event macro in the worksheet code area: Private Sub Worksheet_Calculate() If OldVar = Range("B15").Value Then Exit Sub Range("B16").Speak OldVar = Range("B15").Value End Sub Insert the following macro in the workbook code area: Private Sub Workbook_Open() OldVar = Sheets("Sheet1").Range("B15").Value End Sub -- Gary''s Student - gsnu200817 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text to speech upon cell selection, Excel 2007? | Excel Discussion (Misc queries) | |||
TEXT TO SPEECH CHANGES | Excel Discussion (Misc queries) | |||
text to speech | Excel Discussion (Misc queries) | |||
text to speech | Setting up and Configuration of Excel | |||
text to speech | Excel Discussion (Misc queries) |