+ Reply to Thread
Results 1 to 4 of 4

Temporary Excel Not Responding when playing a wav file

  1. #1
    Registered User
    Join Date
    02-24-2019
    Location
    Hanover Park, Illinois
    MS-Off Ver
    365
    Posts
    2

    Temporary Excel Not Responding when playing a wav file

    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

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: Temporary Excel Not Responding when playing a wav file

    Hi Sabrina,

    You could make a shape with the message and make it invisible
    and make it visible with activesheet.shapes('NotResponding').visible = true while the sound runs, and after that make it invisible again

    making it flashing is making it harder then it needs to be. (excel is not multi treathed)

    Grtz

  3. #3
    Registered User
    Join Date
    02-24-2019
    Location
    Hanover Park, Illinois
    MS-Off Ver
    365
    Posts
    2

    Re: Temporary Excel Not Responding when playing a wav file

    Hi GRTZ ... Thank you. I was not trying to make it flash. While the speech.speak is running, the screen will give the excel not responding error. Nothing should be processing but the speak ... so I don't know how to fix it.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,488

    Re: Temporary Excel Not Responding when playing a wav file

    Post the workbook with the code.


    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Temporary File Keeps Opening even after I delete it
    By akwishestofish in forum Excel General
    Replies: 1
    Last Post: 03-30-2015, 10:48 AM
  2. [SOLVED] How administrator can delete temporary excel file generated on se
    By Suhas Sakalikar in forum Excel General
    Replies: 12
    Last Post: 07-30-2010, 03:15 PM
  3. Playing a embedded wav file when excel opens
    By Waving Hello in forum Excel General
    Replies: 1
    Last Post: 04-14-2006, 03:27 PM
  4. Playing a embedded wav file when excel opens
    By Waving Hello in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2006, 08:15 PM
  5. Playing a sound file from Excel
    By Larry in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-10-2006, 02:50 PM
  6. Playing a WAV file in Excel 2002
    By chalky in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2006, 03:10 PM
  7. [SOLVED] Excel Creating Temporary File After Saving
    By NicIT in forum Excel General
    Replies: 1
    Last Post: 02-13-2005, 10:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1