Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Speech.Speak error

I'm working on a Jeopardy game that uses the Speech.Speak method to read the
questions and answers and a double-click event to move through worksheets
containing them. I've found that double-clicking too soon after the Speak
command causes the macro to crash on the next line of code.

Here's a simple example. I've found that with the following module if I
double-click too soon a second time, the macro crashes. I tried inserting a
pause loop before the speech command, but that doesn't make a difference. I
think I understand why that doesn't work, something to do with keystroke
buffers, if that's the right term.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)

Dim pause As Double

Cancel = True
Application.Speech.Speak Application.UserName & "is an excellent programmer"

End Sub

Any suggestions on how to fix?

Thanks,

Doug


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Speech.Speak error

Doug,

Try

Application.Speech.Speak _
Application.UserName & "is an excellent programmer", True



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Doug Glancy" wrote in message
...
I'm working on a Jeopardy game that uses the Speech.Speak

method to read the
questions and answers and a double-click event to move through

worksheets
containing them. I've found that double-clicking too soon

after the Speak
command causes the macro to crash on the next line of code.

Here's a simple example. I've found that with the following

module if I
double-click too soon a second time, the macro crashes. I

tried inserting a
pause loop before the speech command, but that doesn't make a

difference. I
think I understand why that doesn't work, something to do with

keystroke
buffers, if that's the right term.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object,

ByVal Target
As Range, Cancel As Boolean)

Dim pause As Double

Cancel = True
Application.Speech.Speak Application.UserName & "is an

excellent programmer"

End Sub

Any suggestions on how to fix?

Thanks,

Doug




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Speech.Speak error

Thanks Chip,

You are indeed an excellent programmer.

Doug


"Chip Pearson" wrote in message
...
Doug,

Try

Application.Speech.Speak _
Application.UserName & "is an excellent programmer", True



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Doug Glancy" wrote in message
...
I'm working on a Jeopardy game that uses the Speech.Speak

method to read the
questions and answers and a double-click event to move through

worksheets
containing them. I've found that double-clicking too soon

after the Speak
command causes the macro to crash on the next line of code.

Here's a simple example. I've found that with the following

module if I
double-click too soon a second time, the macro crashes. I

tried inserting a
pause loop before the speech command, but that doesn't make a

difference. I
think I understand why that doesn't work, something to do with

keystroke
buffers, if that's the right term.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object,

ByVal Target
As Range, Cancel As Boolean)

Dim pause As Double

Cancel = True
Application.Speech.Speak Application.UserName & "is an

excellent programmer"

End Sub

Any suggestions on how to fix?

Thanks,

Doug






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
speak cells Dave Excel Discussion (Misc queries) 2 March 25th 10 06:20 PM
Speak Cell Renatoabc Setting up and Configuration of Excel 0 September 7th 08 06:34 PM
Problem with Text to Speak [email protected] Excel Worksheet Functions 1 May 4th 07 09:56 PM
how to get excel to speak to me gym bunny Setting up and Configuration of Excel 2 April 4th 07 08:48 AM
Where has 'speak on enter' gone? Brian Excel Discussion (Misc queries) 2 October 22nd 06 07:06 PM


All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"