当按下 Enter 或完成了对活动单元格的编辑时,Microsoft Excel 支持朗读活动单元格的模式。如果 SpeakCellOnEnter 属性为 True,则打开此模式。如果为 False,则关闭此模式。Boolean 类型,可读写。
expression.SpeakCellOnEnter
expression 必需。该表达式返回一个 Speech 对象。
本示例确定在按下 Enter 或完成了对活动单元格的编辑时,是否朗读活动单元格,并通知用户。
Sub SpeechCheck()
' Determine mode setting and notify user.
If Application.Speech.SpeakCellOnEnter = True Then
MsgBox "The Speak On Enter mode is turned on. " & _
"The active cell will be spoken when the ENTER "& _
"key is pressed or it is done being edited."
Else
MsgBox "The Speaker On Enter mode is turned off."
EndIf
End Sub