HI EVERYBODY!
I'm programming an audible cash register that will play sound files when the purchase is completed. EXAM: "Your Total Is Four Dollars And Thirty-Six Cents". I've completed the algorithm for computing which sound files will play; calling each sound file as needed for playback.
I am in need of VBA code that will allow me to play a specific .wav sound file as needed.
EXAM:
This I programmed. (The algorithm is not as simple as shown below but I decided, for brevity sake, to describe it accordingly.)
---------------------------------------------------------
Public Sub PlayYourTotal()
Call Play (YourTotalIs.wav)
Call Play (Four.wav)
Call Play (Dollars.wav)
Call Play (And.wav)
Call Play (Thirty.wav)
Call Play (Six.wav)
Call Play (Cents.wav)
End Sub
Public Function Play(WavName)
'Play the .wav file
(What code goes here?)
End Function
----------------------------------------------------------
At this time I don't know how to play a .wav file. I'm sure that if I can play one sound file (.wav), I can play them all.
Thank you for your consideration and most appreciated help.
Richard
I'm programming an audible cash register that will play sound files when the purchase is completed. EXAM: "Your Total Is Four Dollars And Thirty-Six Cents". I've completed the algorithm for computing which sound files will play; calling each sound file as needed for playback.
I am in need of VBA code that will allow me to play a specific .wav sound file as needed.
EXAM:
This I programmed. (The algorithm is not as simple as shown below but I decided, for brevity sake, to describe it accordingly.)
---------------------------------------------------------
Public Sub PlayYourTotal()
Call Play (YourTotalIs.wav)
Call Play (Four.wav)
Call Play (Dollars.wav)
Call Play (And.wav)
Call Play (Thirty.wav)
Call Play (Six.wav)
Call Play (Cents.wav)
End Sub
Public Function Play(WavName)
'Play the .wav file
(What code goes here?)
End Function
----------------------------------------------------------
At this time I don't know how to play a .wav file. I'm sure that if I can play one sound file (.wav), I can play them all.
Thank you for your consideration and most appreciated help.
Richard