
Help with Shell command from VBA in Excel
I have an Excel form with a button. When the button is clicked, I'd like
it to play a verbal warning. I try to accomplish this with:
Shell ("c:\winnt\system32\mplay32.exe c:\warning.wav")
This results in the Media Player being opened, and then immediately
being minimzed and placed on the taskbar.
I am able to bring it to the foreground with:
Sendkeys "%{TAB}"
Which simultes the Alt-Tab (what a kludge). Then I try to play it with:
Sendkeys "%P"
which doesn't work. However, if I run this code, and then press
Alt-P myself, the thing plays.
Help! How can I do this? Many, many thanks.
Steve
PS: I've also unsuccessfully tried this with sndrec32.exe
----------------
Steve Silberberg
Visit the Air Sickness Bag Museum at:
http://rampages.onramp.net/~stevebo/airsick.html
FACT: Buff Babes Dig Cut Dudes!