play sound (wav) on action

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hello,

Is there a simple way to verify is a windows system wav is installed on
a computer and play the said wav when a form is opened?!

This is what I am looking to do but I don't know what code or libraries I
need to utilize:

if c:\windows\media\tada.wav exist then
play c:\windows\media\tada.wav
end if

Thanks,

Daniel
 
Daniel said:
Is there a simple way to verify is a windows system wav is installed on
a computer and play the said wav when a form is opened?!

This is what I am looking to do but I don't know what code or libraries I
need to utilize:

if c:\windows\media\tada.wav exist then
play c:\windows\media\tada.wav
end if


Use the Dir function to check if a file exists.

You can use the code at
http://www.mvps.org/access/api/api0011.htm
to play a .wav file.

If DIr("c:\windows\media\tada.wav") <> "" Then
fPlayStuff("c:\windows\media\tada.wav")
End If
 
Back
Top