+ Reply to Thread
Results 1 to 3 of 3

Playing an audio file from a macro.

  1. #1
    Registered User
    Join Date
    06-04-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    53

    Playing an audio file from a macro.

    Hi everyone,

    I run a macro which monitors a couple of variables on a 10 minute basis and when the variables reaches a certain level I play a sound or alarm. The alarm sound is on a WAV file on my hard drive and when the alarm needs to be rung the macro goes to a hyperlink on the Excel spreadsheet and “presses” the link. The hyperlink is at cell A10.

    Please Login or Register  to view this content.
    If I open the file directly using the macro then it opens up a media player to play the alarm which I do not want.

    Is there a way of calling and playing the alarm audio file and without opening up media player?
    Last edited by AliJay; 06-09-2010 at 03:22 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Playing an audio file from a macro.

    Good morning AliJay
    Quote Originally Posted by AliJay View Post
    Is there a way of calling and playing the alarm audio file and without opening up media player?
    Certainly is. Have a look in our very own ExcelTip area for a useful code snippet to do just that :
    http://www.exceltip.com/st/Playing_W...Excel/460.html

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    06-04-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Playing an audio file from a macro.

    Thanks Dom - that shoudl do it!! Your time is much appreciated.

    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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