Stop Windows Media Player from Popping Up

The Dutchman

Board Regular
Joined
Apr 10, 2008
Messages
72
I have embedded a wav file into a template. When you click on a commandbutton (caption is a hint to an answer) a 3 second countdown starts and then a bell chimes(embedded wav file) and the commandbutton caption shows the answer.

My problem is that when the wav file plays, sometime the Window Media Player screen pops up and sometimes it does not.

How can I suppress the Window Media Player from popping up? Just n FYI I used a mp3file and converted the file extension to wav. My code is as follows:

Code:
Private Sub CommandButton8_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

If CommandButton8.Caption = "John Doe" Then
    CommandButton8.Caption = "I was the varsity athlete of the year... back in the day."

Else

If CommandButton8.Caption = "I was the varsity athlete of the year... back in the day." Then
    UserForm3.Show
    
     'THIS IS THE CODE I USED TO INTIATE THE EMBEDDED WAV FILE
    Application.ScreenUpdating = False  
    Sheet1.OLEObjects("Object 29").Verb Verb:=xlPrimary
    Application.ScreenUpdating = True
    
    CommandButton8.Caption = "John Doe"

End If
End If

End Sub
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

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