Speak on Enter

Chris Williamson

Board Regular
Joined
Oct 16, 2010
Messages
83
Good evening guys,

When the "Speak on Enter" command is turned on, and you type the word "Hello" into cell A1.
Excel will say the word "Hello" out loud via your speakers, in a Stephen Hawkins type of voice.

However if you have a simple macro to insert the text "Hello" into cell A1.

Code:
    Text1 = ("Hello")
    Sheet1.Range("A1").Value = Text1

The "Speak on Enter" command does not work.

How do you get the "Speak on Enter" command to work with the macro code?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
i thought it was something like

range("A1").speak
 
Upvote 0
I don't know what you mean by the, "Speak on Enter" Command.

In Excel 2003 you can use the "Speech" function.

For A1 = "Hello"

Code:
[COLOR=#000000][COLOR=#000000][COLOR=darkblue]Private[/COLOR] [COLOR=darkblue]Sub[/COLOR] Workbook_Open()
   [COLOR=darkblue]Dim[/COLOR] Text1 [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
   Text1 = Sheets("Sheet1").Range("A1").Value
 
   Application.Speech.Speak (Text1)
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR][/COLOR]
[/COLOR]
 
Upvote 0
My apologies, I just re-read your post and you may be looking for a Worksheet_Change event. place the code in the Sheet1 module.

Code:
[COLOR=darkblue]Private[/COLOR] [COLOR=darkblue]Sub[/COLOR] Worksheet_Change([COLOR=darkblue]ByVal[/COLOR] Target [COLOR=darkblue]As[/COLOR] Range)
 
   [COLOR=darkblue]Dim[/COLOR] Text1 [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
   [COLOR=darkblue]If[/COLOR] Target <> Range("A1") [COLOR=darkblue]Then[/COLOR]
      [COLOR=darkblue]Exit[/COLOR] [COLOR=darkblue]Sub[/COLOR]
   [COLOR=darkblue]End[/COLOR] [COLOR=darkblue]If[/COLOR]
 
   Text1 = Range("A1").Value
   Application.Speech.Speak (Text1)
 
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]

Edit: Oops, too late.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top