I would either like to prevent the screen flashing Excel Not Responding, or prevent the temporary condition from occurring.
It is a phonics workbook for my grandson.
Here is the relevant code:
Byshape:
ActiveSheet.Shapes(tgtobj).Select
Selection.Copy
' Sheets(tgtsht).Select
Range("F11").Select
ActiveSheet.Paste
Selection.Name = "VewObject"
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Width = 108
Selection.ShapeRange.Height = 61.92
Range("A1").Select
DoEvents
Application.speech.Speak vocfile
' Play Vowel Sound
sPath = "C:\awork\phonics\lettersounds\" & wavfile
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
PlaySound sPath, 0&, SND_SYNC THIS CALLS A (vowel sound).wav file
' TEMPORARY EXCEL NOT RESP0NDING SCREEN REFRESH OCCURS HERE WHILE RUNNING PlaySound
Application.Wait (now + TimeValue("0:00:10"))
Application.EnableEvents = True
Application.ScreenUpdating = True
Sheets(tgtsht).Range("F6").Value = "Repeat the letter sound."
Application.speech.Speak "Repeat the letter ,."
Application.Wait (now + TimeValue("0:00:03"))
Thank you,
Sabrina
Bookmarks