Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2006, 08:41 AM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C.W. Clark
Default Command Button event WMV File

Hello to all.....I searched the forums but was having trouble finding any related posts....if there is one please redirect me and I apologize for the post...if one does not exist, well here's what I'm trying to figure out:

I'm using time study software that is based in an excel environment....I usually record the operation to be timed and study it that way.....after the study has been completed and the standards saved.....I assign a command button to the a particular sheet labeled "PLAY VIDEO"....I thought I would be able to do the following:

private sub command_button1_click
Shell ("C:example\example\example.wmv")
end_sub

However it returns a file not found error.

Windows media player is playing the video.....it is an mpeg1 format....do i need to write code to open the player and then tell it which file to play. Any help would be appreciated....excuse the script above....I know it's not 100% accurate...let me know if you need any more info. Thanks for your time in advance.

 
Old August 7th, 2006, 08:51 AM
Authorized User
 
Join Date: Mar 2006
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you need to specify which file you want to run.. like this

Code:
Shell ("C:\Program Files\Windows Media Player\wmplayer.exe C:\example\example\example.wmv")
 
Old August 7th, 2006, 09:36 AM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C.W. Clark
Default

Thanks for the help.....However....when I try to launch the file this way Windows media player will not recognize the file type ".mpg"....however if you go to the file and open it directly it plays it just fine....I'm using version 9....and it supports .mpg....

Shell "C:\Program Files\Windows Media Player\wmplayer.exe C:\example\example\example.mpg"

I copied the file location directly from the WMP when the video was queued up....back to the drawing board...






Similar Threads
Thread Thread Starter Forum Replies Last Post
delay in firing the button event - upload a file priyan.viji .NET Framework 2.0 1 February 9th, 2008 08:31 AM
Want command line convertoer for WMV format tarduk2004 ASP.NET 2.0 Basics 0 September 19th, 2007 11:33 PM
Embedding a wmv file arimakidd HTML Code Clinic 1 March 27th, 2007 04:32 PM
cannot insert OLE command button event code janefu Excel VBA 1 January 10th, 2006 04:33 AM
About Button event and Keydown event zhangxujun1981 XSLT 1 March 6th, 2004 04:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.