Mp3 file not playing?

popetropolis

New Member
Joined
Aug 15, 2013
Messages
18
I would like for "Object 3" which is an mp3 file to play on my "Start Page" when the "image1" is clicked. I can double click Object 3 and it plays, but I can not seem to get my code to play it. Code I added for the mp3 to play is in red. Thanks!!!!

Private Sub Image1_Click()

Dim save_as As Variant
Dim file_name As String
Dim ProgramName As String
file_name = ProgramName
' Get the file name.
save_as = Application.GetSaveAsFilename(file_name, _
FileFilter:="Excel Files,*.xlsm,All Files,*.*")
' See if the user canceled.
If save_as = False Then Exit Sub
' Save the file with the new name.
Application.DisplayAlerts = False
If LCase$(Right$(save_as, 4)) <> ".xlsm" Then
file_name = save_as & ".xlsm"
End If
ActiveWorkbook.SaveAs Filename:=save_as

Worksheets("Gen Info").Visible = True
Worksheets("S Input").Visible = True
Worksheets("E Input").Visible = True
Worksheets("LOOSE").Visible = True
Worksheets("Job Summary").Visible = True
Worksheets("Gen Info").Select

ErrorHandler:

Sheets("Start Page").Select
ActiveSheet.Unprotect
Application.DisplayAlerts = False 'to turn off the warning'
Range("A1").Select
ActiveSheet.Shapes("Object 3").Select
Selection.Verb Verb:=xlPrimary
Application.DisplayAlerts = True 'turn the warning back on
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Worksheets("Start Page").Visible = False

End Sub
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

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