Hide visual interface when playing audio (m4a)

oseitutuSamuel

Board Regular
Joined
Jul 31, 2015
Messages
82
Hi All,

I have a VBA code that plays an audio (ma4) created in Camtasia. When I play the audio, I only want to hear the sound/voice
without the interface displaying. I used the code below, but no matter how I fiddle with it, the media always appears when playing.
I only wish to hear the audio and nothing else. Any help please?

Thanks:

This is a partial code:

Private Sub Worksheet_Activate()
Dim FileName As String
Dim Result As LongPtr
FileName = ThisWorkbook.path & "\audio.m4a"
Result = ShellExecute(0&, "", FileName, "vbNullString", "vbNullString", vbNormalFocus)
If Result < 32 Then MsgBox "Error"
End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
ShellExecute simply launches whatever your default application for the file is. I suspect the best you could achieve with this code would be something like this, which should hide the app:

Code:
Result = ShellExecute(0&, "", FileName, 0&, 0&, 0&)
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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