is it possible to make excel text speech on file opening ?

netanel99

Board Regular
Joined
May 13, 2013
Messages
174
Office Version
  1. 2021
Platform
  1. Windows
hello dear excelers :)

I'm trying to make excel text speech - sheet "x" cell "y" every time excel opens ,
Is it possible to do it ?

thanks for any help u excelers are awesome :cool:
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on any sheet tab
Select View Code from the pop-up context menu
Click on This Workbook
Paste the code in the VBA edit window.

Modify sheet name and cell location as needed. cells(1,1) is same as Range("A1")

Code:
Private Sub Workbook_Open()
'Modified 4-6-18 8:45 PM EDT
Dim ans As String
ans = Sheets("Me").Cells(1, 1).Value
Application.Speech.Speak (ans)
End Sub
 
Last edited:
Upvote 0
thanks that was awesome,
is it possible to have a table with different texts - and every time the file opens it will randomly text speech a different text ?
that will be soo informative and helpful ,
It's not critical but I wish excel could just open itself and then read, instead of reading the text and then open the file.
 
Upvote 0
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.

As too your new request:
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.


thanks that was awesome,
is it possible to have a table with different texts - and every time the file opens it will randomly text speech a different text ?
that will be soo informative and helpful ,
It's not critical but I wish excel could just open itself and then read, instead of reading the text and then open the file.
 
Upvote 0
If you want to randomly select a greeting when you open the workbook, create a sheet called Greetings, and put your greetings in column A, no empty rows. You can then hide that sheet if you want. Then use this modification of MAIT's macro:

Code:
Sub Workbook_Open()
Dim MyCount As Long, r As Long, ans As String

    MyCount = WorksheetFunction.CountA(Range("Greetings!A:A"))
    r = Int(Rnd() * MyCount) + 1
    ans = Sheets("Greetings").Cells(r, "A")
    Application.Speech.Speak ans
    
End Sub
 
Upvote 0
thank u very much Eric - I just intended to write that I found a solution but this is next level solution, I didn't thought I'll find a solution.
I just made a table with 1,2,3 numbering column in the first table's column and then entered this formula in cell A3:
Code:
=VLOOKUP(RANDBETWEEN(MIN(טבלה11[number]),MAX(טבלה11[number])),טבלה11,2,FALSE)
and made excel text speak A3 cell with the formula described .thank you so much, this tool is awesome!!
 
Upvote 0

Forum statistics

Threads
1,224,271
Messages
6,177,620
Members
452,786
Latest member
k3calloway

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