Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to play wave file
Vasant helped me with the code below and it works great. It's designed to
play a wave file. Problem is, I want it to play a long wave file - about 1 minute long all the way through to the end, but it only plays about 10 sec. Any ideas? TIA yobeee Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, _ ByVal dwFlags As Long) As Long Sub PlayMe1() Dim retval As Long retval = PlaySound("C:\my documents\my folder\wav1.wav", 0, &H20000) End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to play wave file
First embed the wav file in Excel by Insert/Object/Create from file
Sub MusicDemo() Worksheets("sheet1").OLEObjects(1).Verb End Sub Verb is a generic metehod that uses the appropriate associated program for an object embedded in Excel. HTH, Greg "yo beee" wrote in message ... Vasant helped me with the code below and it works great. It's designed to play a wave file. Problem is, I want it to play a long wave file - about 1 minute long all the way through to the end, but it only plays about 10 sec. Any ideas? TIA yobeee Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, _ ByVal dwFlags As Long) As Long Sub PlayMe1() Dim retval As Long retval = PlaySound("C:\my documents\my folder\wav1.wav", 0, &H20000) End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I play a .WAV file in Excel if a condition is met? | Excel Worksheet Functions | |||
How to insert and play flash file in excel | Excel Discussion (Misc queries) | |||
How can i play a wave file in excel? | Excel Discussion (Misc queries) | |||
How do I enter a wave sound file into an excel cell? | Excel Discussion (Misc queries) | |||
Button for wave file | Excel Programming |