VBA play soundeffect based on cell value

Faygin

New Member
Joined
May 12, 2020
Messages
23
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a button that runs a macro.

After i push the button a lot of different things happen.

One of the things i want to achieve is that i have a cell, lets call it "A1" with a value (1-9).

Depending on the value (1-9) i have 9 different soundeffects that i want to play depending on the number in cell "A1"
1 is soundeffect "A"
2 is soundeffect "B"
3 is soundeffect "C"

They are short 4 second sounds currently in Mp3 format.

And i dont want any media programs to open, i just want it to be played within excel.

Are there any smart and hopefully easy way to achieve this?

Im looking for something like:

If A1 = 1 then play "a"
if A1 = 2 then play "b"
etc

I know that it isnt going to be that easy, but if someone has any pointers or directions it would be super helpful!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top