Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
applcation.run
good morning to everybody
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Sub test() sndPlaySound "C:\Suresh\Twinkle1.wav", SND_ASYNC End Sub the above metioned macro is working well.. the prob. is that i want to keep this as my backgroud music, meanwhile i want to work as usual.. and also it should run until i will close the file. anybody can help me?? thanks in advance with best regards, suresh tp |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
applcation.run
Try this
Private nTime As Date Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub test() playSound End Sub Sub playSound() Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 nTime = Now() + TimeSerial(0, 0, 10) ' 10 secs sndPlaySound "C:\Windows\Media\Microsoft Office 2000\Chimes.wav", SND_ASYNC Application.OnTime nTime, "playSound" End Sub Sub stopSound() Application.OnTime nTime, "playsound", schedule:=False End Sub -- HTH RP (remove nothere from the email address if mailing direct) "SURESH TP" wrote in message ... good morning to everybody Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Sub test() sndPlaySound "C:\Suresh\Twinkle1.wav", SND_ASYNC End Sub the above metioned macro is working well.. the prob. is that i want to keep this as my backgroud music, meanwhile i want to work as usual.. and also it should run until i will close the file. anybody can help me?? thanks in advance with best regards, suresh tp |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
applcation.run
hi dear bob..
good evening.. thank you for you advise and now what is the prob. that when i am exit the file is opening the automatically. to close the file i have to close twise. plz. help me.. best regards, suresh "Bob Phillips" wrote in message ... Try this Private nTime As Date Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub test() playSound End Sub Sub playSound() Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 nTime = Now() + TimeSerial(0, 0, 10) ' 10 secs sndPlaySound "C:\Windows\Media\Microsoft Office 2000\Chimes.wav", SND_ASYNC Application.OnTime nTime, "playSound" End Sub Sub stopSound() Application.OnTime nTime, "playsound", schedule:=False End Sub -- HTH RP (remove nothere from the email address if mailing direct) "SURESH TP" wrote in message ... good morning to everybody Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Sub test() sndPlaySound "C:\Suresh\Twinkle1.wav", SND_ASYNC End Sub the above metioned macro is working well.. the prob. is that i want to keep this as my backgroud music, meanwhile i want to work as usual.. and also it should run until i will close the file. anybody can help me?? thanks in advance with best regards, suresh tp |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
applcation.run
hi dear bob..
good evening.. thank you for you advise and now what is the prob. that when i am exit the file is opening the automatically. to close the file i have to close twise. plz. help me.. best regards, suresh "Bob Phillips" wrote in message ... Try this Private nTime As Date Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub test() playSound End Sub Sub playSound() Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 nTime = Now() + TimeSerial(0, 0, 10) ' 10 secs sndPlaySound "C:\Windows\Media\Microsoft Office 2000\Chimes.wav", SND_ASYNC Application.OnTime nTime, "playSound" End Sub Sub stopSound() Application.OnTime nTime, "playsound", schedule:=False End Sub -- HTH RP (remove nothere from the email address if mailing direct) "SURESH TP" wrote in message ... good morning to everybody Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Sub test() sndPlaySound "C:\Suresh\Twinkle1.wav", SND_ASYNC End Sub the above metioned macro is working well.. the prob. is that i want to keep this as my backgroud music, meanwhile i want to work as usual.. and also it should run until i will close the file. anybody can help me?? thanks in advance with best regards, suresh tp |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
applcation.run
Consider using a program better suited to the task of playing background
music. Use Windows Media Player or Real Player or... -- Regards, Tushar Mehta www.tushar-mehta.com Multi-disciplinary business expertise + Technology skills = Optimal solution to your business problem Recipient Microsoft MVP award 2000-2005 In article , says... good morning to everybody Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Sub test() sndPlaySound "C:\Suresh\Twinkle1.wav", SND_ASYNC End Sub the above metioned macro is working well.. the prob. is that i want to keep this as my backgroud music, meanwhile i want to work as usual.. and also it should run until i will close the file. anybody can help me?? thanks in advance with best regards, suresh tp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
External data queries within applcation collection | Excel Programming |