Forum Discussion

Excel1020's avatar
Excel1020
Copper Contributor
Sep 23, 2019
Solved

Conditionally Making a Sound

Hi Excel friends, hope you can help me! 

 

I am trying to play a sound when a condition in a specific cell is met (cell value is higher than for example 20)

 

I have tried to use the VBA script on https://excelribbon.tips.net/T005834_Conditionally_Making_a_Sound.html

https://www.extendoffice.com/documents/excel/4417-excel-play-sound-if-condition-is-true.html

but when I use the formula =IF(A1>300,BeepMe(),"") I get an error message: "there is an errow in your formula.

 

Does anyone know what the problem is? (I am using Office professional plus 2016 32 bit)

 

Thanks you very much!

 

Martin

  • Hi Excel1020 

     

    Not sure what your issue is but have attached a sample file done with the instructions from the second link in your post, which works perfectly. The function is saved in module1.

     

    Regards

     

    Rich99

2 Replies

  • Rich99's avatar
    Rich99
    Iron Contributor

    Hi Excel1020 

     

    Not sure what your issue is but have attached a sample file done with the instructions from the second link in your post, which works perfectly. The function is saved in module1.

     

    Regards

     

    Rich99

    • Excel1020's avatar
      Excel1020
      Copper Contributor

      Rich99 

       

      Thank you so much Rich99, based on you spreadsheet I found where I went wrong!

      Right is
      =IF(C20>0,15;SoundMe())

      Instead of
      =IF(A1>300,SoundMe(),"")

      And I did not add a module to add the VBA script (I am a newbee to VBA)

Resources