+ Reply to Thread
Results 1 to 8 of 8

Error in code - play music file automatically after opening file

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Error in code - play music file automatically after opening file

    Dear experts,
    Please correct my code to play the music file automatically after opening the file.

    Thanking you in anticipation.

    Mukesh
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Error in code - play music file automatically after opening file

    I worked this out in Excel 2003, going under the assumption that
    you do not want to deal with an open media player after you close
    Excel. This may not work, as is, for your Excel version, but give
    my attached file a try to see if it has the effect you are looking for.
    Then, if there are incompatibilities between Excel versions, someone
    else on the forum may have an idea how to fix the problem.
    This code goes in a new module:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Error in code - play music file automatically after opening file

    Hello xLJer,
    Excellent! It's working fine as per my requirement. I want to play the background instrumental music while working in excel. If you have any instrumental background music in mp3 format do send it to me on my personal email id as follows:

    [email protected]

    Now my problem is solved.

    Thank you for your guidance.

    Mukesh

  4. #4
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Error in code - play music file automatically after opening file

    Hello xLJer,
    The song is of 10 minutes and then it didn't play again. If I want to repeat the song continuously till the file is open then what change should I do in code?

    Thanking you in anticipation.

    Mukesh

  5. #5
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Error in code - play music file automatically after opening file

    To have the music file play repeatedly, do these steps.

    In Sheet1 module, add this code:
    Please Login or Register  to view this content.
    In the module with the Auto_Open sub, change
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    When I run it, a bell (ding sound) rings after the file finishes. I was unable to find the reason for the bell.

  6. #6
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Error in code - play music file automatically after opening file

    Hello Jerry,
    It sounds little confusing to me. Please do attach a excel sheet with codes to understand it me better and avoide any mistake.

    Thanking you in anticipation.

    Mukesh

  7. #7
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Error in code - play music file automatically after opening file

    The workbook with revisions to play an MP3 file repeatedly is attached.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Error in code - play music file automatically after opening file

    DearJerry,
    Thank you. It's working fine.

    Thank you.

    Mukesh

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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