Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
External data queries within applcation collection Andy S Excel Programming 2 November 24th 03 08:44 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"