How can i play a wave file in excel?

P

pj

I have stock data coming in via DDE link. I want to play a .wav file if a
High or Low value is reached.
 
G

Gary''s Student

Since most .wav files are pretty, just insert it in the worksheet:

Insert > Object etc.

find the place in your macro that you want the file played and insert
something like:

ActiveSheet.Shapes("Object 1").Select
Selection.Verb Verb:=xlPrimary
 
P

pj

Thanks for the input - sadly I have lttile experience with VBA.
Could you provide a little more syntax? Assuming values in X25, X26, X27
Label 1
If X25 >= X26 play file1.wav
If X25 <= X27 play file2.wav
goto Label 1

It would be nice to be able to access the speech center also and have it
read the contents of specified cells.
i.e. if X25>X26 play file1.wav and Read/Say contents of Z30
 
Top