Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I would like to create a macro that will:
1) play a WAV file 2) wait 5 seconds 3) play the WAV file again 4) wait 10 seconds 5) play the WAV file again 6) wait 5 seconds 7) play the WAV file again Thanks!!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Which part do you need help with.
For the "wait" use application.ontime -- Tim Williams Palo Alto, CA "One-Leg" wrote in message ... Hello, I would like to create a macro that will: 1) play a WAV file 2) wait 5 seconds 3) play the WAV file again 4) wait 10 seconds 5) play the WAV file again 6) wait 5 seconds 7) play the WAV file again Thanks!!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Basically, I would like to know the code to play a WAV file and also the code
to have a delay between 2 commands "Tim Williams" wrote: Which part do you need help with. For the "wait" use application.ontime -- Tim Williams Palo Alto, CA "One-Leg" wrote in message ... Hello, I would like to create a macro that will: 1) play a WAV file 2) wait 5 seconds 3) play the WAV file again 4) wait 10 seconds 5) play the WAV file again 6) wait 5 seconds 7) play the WAV file again Thanks!!! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Tim suggested For the "wait" use application.ontime Have a look in your help file for ontime. -- Ivan F Moala ------------------------------------------------------------------------ Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954 View this thread: http://www.excelforum.com/showthread...hreadid=507531 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I did but I find this and I tried everything but nothing works:
Example This example runs my_Procedure 15 seconds from now. Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure" This example runs my_Procedure at 5 P.M. Application.OnTime TimeValue("17:00:00"), "my_Procedure" This example cancels the OnTime setting from the previous example. Application.OnTime EarliestTime:=TimeValue("17:00:00"), _ Procedu="my_Procedure", Schedule:=False |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried using but I get an error message (Argument not optional) 5 seconds
after teh first WAV sound is played: Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Sub PlaySound() If Application.CanPlaySounds Then Call sndPlaySound32("C:\Sound.wav", 0) End If Application.OnTime Now + TimeValue("00:00:05"), "sndPlaySound32" End Sub |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I FINALLY FOUND IT!!! I need to run this "sound()" macro and it works...
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Sub PlaySound() Call sndPlaySound32("C:\Sound.wav", 0) End Sub Sub sound() Call sndPlaySound32("C:\Sound.wav", 0) Application.OnTime Now + TimeValue("00:00:05"), "PlaySound" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sendkeys(keys,wait) how do I use wait | Excel Discussion (Misc queries) | |||
Learn Everything !!! Play something!!! | Charts and Charting in Excel | |||
Go to and play | Excel Discussion (Misc queries) | |||
How play a wav file | Excel Programming |