View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KJ MAN[_2_] KJ MAN[_2_] is offline
external usenet poster
 
Posts: 27
Default Excel 2007 Shell Command Runtime Error HELP

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