Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On my computer (Intel-compatible with Win XP and VB 6.3, which I access
through Excel 2003), the Beep statement initiates the sound, then it returns control before the sound is completed. Is there any way in VB (probably using kernel APIs) to determine when the sound is completed? For example, if the Default Beep is set to Windows XP Startup.wav, the sound takes about 2.75 sec on my computer. Consequently, the following loop results in interrupting and restarting the sound instead of playing the sound repeatedly after a delay of 500 msec after the sound completes. Public Declare Sub Sleep Lib "kernel32" (ByVal msec As Long) Sub doit() Dim i as Long Beep For i = 2 to 5 ' want to wait for sound to complete here ' before sleeping Sleep 500 Beep Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you stop a Msgbox from making a beep sound? Thanks. | Excel Programming | |||
Sound / Beep function from within VB or Excel VBA | Excel Programming | |||
Beep Change The Sound | Excel Discussion (Misc queries) | |||
Beep or Make Sound after Calcing | Excel Programming | |||
How BEEP on internal speakers, not on sound-card? | Excel Programming |