application.run

S

SURESH TP

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
 
M

Martin Seelhofer

Hey there
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.

Application.OnTime might be something for you. Just call
it once in an AutoOpen or AutoExec macro (or in the
Document_Open event handler) and call it again inside
your macro...

NB: You should know how long your music file plays in
order to prevent overlayed playback or periods of silence


Cheers,
Martin
 
Top