Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sound

I am trying to click on a cell and have it play a wav file.... I have that
part working fine ( I belive )

But when I close excel after playing 1 or more wavs if always ask me if I
want to save changes
and I get the popup after only playing a file...no other changes.
Is there a way around this.... thanks



Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _
hModule As Long, _
ByVal dwFlags As Long) As Long


Public Function PlayWavFile(WavFile As String) As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
PlaySound WavFile, 0, SND_ASYNC Or SND_FILENAME
PlayWavFile = ""
End Function


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Dim WFile As String

WFile = ActiveCell.Value + ".wav"
WFile = ThisWorkbook.Path & "\" & WFile
PlayWavFile (WFile)
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound when a value is entered. Loren Excel Discussion (Misc queries) 2 April 9th 09 11:33 PM
Sound alert Antonio Excel Discussion (Misc queries) 3 May 30th 06 07:09 PM
can I add sound to a spreadsheet? add sound to spreadsheet Excel Discussion (Misc queries) 4 February 20th 06 11:08 PM
playing sound??? tess457[_6_] Excel Programming 2 October 20th 04 11:50 AM
This may sound stupid..... anthonyenglish Excel Programming 3 October 14th 04 07:05 PM


All times are GMT +1. The time now is 04:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"