SOLVED

Conditionally Making a Sound

Copper Contributor

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

2 Replies
best response confirmed by Excel1020 (Copper Contributor)
Solution

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

@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)

1 best response

Accepted Solutions
best response confirmed by Excel1020 (Copper Contributor)
Solution

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

View solution in original post