Excel 2007 Shell Command Runtime Error HELP

K

KJ MAN

In Excel 2003, this code worked fine

Private Sub CommandButton1_Click()
Worksheets("Player").Activate
Range("B4").Select
PlayFile = Shell( _
"C:\Program Files\Windows Media Player\wmplayer.exe ""E:\" &
ActiveCell.Value & """", 1)

Worksheets("Player").Range("A4:C4").Delete Shift:=xlShiftUp

End Sub

In Excel 2007, Windows Media Player opens, but I get a
Microsoft Visual C++ Runtime Library error.
Runtime Error!

Program: C:\Program Files\Windows Media Player\wmplayer.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Can anyone explain to me why?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top