Speech facility

J

Jonni_Grant

Hi,

There is a speech facility in Excel which is great for my work but I would
like to have it where Excel uses the speech facility on opening a
workbook....sort of a welcome and basic instruction as soon as the file is
opened.

Is this possible??

Jon
 
D

Dave Peterson

You could use a macro:

Option Explicit
Sub auto_open()
Dim myStr As String

Select Case Time
Case Is <= TimeSerial(12, 0, 0)
myStr = "Good Morning"
Case Is <= TimeSerial(18, 0, 0)
myStr = "Good Afternoon"
Case Else
myStr = "Good Evening"
End Select

With Application
.Speech.Speak Text:=myStr & " " & .UserName
End With

End Sub
 
J

Jonni_Grant

Really excellent - thanks Dave!

Dave Peterson said:
You could use a macro:

Option Explicit
Sub auto_open()
Dim myStr As String

Select Case Time
Case Is <= TimeSerial(12, 0, 0)
myStr = "Good Morning"
Case Is <= TimeSerial(18, 0, 0)
myStr = "Good Afternoon"
Case Else
myStr = "Good Evening"
End Select

With Application
.Speech.Speak Text:=myStr & " " & .UserName
End With

End Sub
 
Top