”Excel VBA” How to Read the Contents of a Cell or TextBox Out Loud as Text.

Excel-VBA

 

higashi
higashi

Hi, I’m higashi.

On this page, I introduce how to read the contents of a cell or textbox out loud as text.

 

OK, let’s get started!!

 

Sponsored Links

How to read out loud a text on Excel VBA

Below is the how to read out loud a text on Excel VBA.

CreateObject(“SAPI.SpVoice”).Speak “Text Contents”

 

Sponsored Links

Sample Code of Read Sentence Out Loud

And This is sample code of it.

This is cell contents version.

Sub Speak_Cell()
    ' Designate the cell to read
    textToRead = Range("A1")
    ' Read it out loud
    CreateObject("SAPI.SpVoice").Speak textToRead
End Sub

 

And This is the version of selected textbox contents.

Sub Speak_Cell()
    ' Designate the cell to read
    textToRead = Selection.Text
    ' Read it out loud
    CreateObject("SAPI.SpVoice").Speak textToRead
End Sub

 

Sponsored Links

Conclusion

I introduced how to read cell or textbox contents out loud on Excel VBA.

 

This blog is operated by japanese who want to study English.

If you feel unconfortable point about my english, please point it out from comment section.

That’s all.

Thank you.

コメント