Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing sound???
is there anyway of playing a sound once a user opens my excel file?? Thanks! -- tess45 ----------------------------------------------------------------------- tess457's Profile: http://www.excelforum.com/member.php...fo&userid=1393 View this thread: http://www.excelforum.com/showthread.php?threadid=27058 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing sound???
John Walkenbach's site:
http://j-walk.com/ss/excel/tips/tip59.htm for playing a sound Chip Pearson's site for information on the Workbook_Open Event http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "tess457" wrote in message ... is there anyway of playing a sound once a user opens my excel file??? Thanks!! -- tess457 ------------------------------------------------------------------------ tess457's Profile: http://www.excelforum.com/member.php...o&userid=13938 View this thread: http://www.excelforum.com/showthread...hreadid=270583 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
playing sound???
Hi Tess457,
Put this code in the workbook open event... Private Sub Workbook_Open() PlayWAV End Sub This code will play any wav you need as long as the wav is in the same folder/directory as the workbook... just put it in a module Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 Sub PlayWAV() WAVFile = "yoursound.wav" WAVFile = ThisWorkbook.Path & "\" & WAVFile Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME) End Sub and it shouls play your sound file when you open the workbook.. hope this helps... ste |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Detecting the actual playing or NOT playing of a WAV file | Excel Discussion (Misc queries) | |||
How do I keep the ding sound from playing when a message appears? | Excel Discussion (Misc queries) | |||
Playing a sound file from entry in cell | Excel Discussion (Misc queries) | |||
Help Playing a sound if a cell's value chjanges as a result of a calculation | Excel Discussion (Misc queries) | |||
Playing a sound base on cell value | Excel Programming |