Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Greetings and TIA for your help
Anyone got VBA code sugestions for opening and running a Windows AVI file from and excel macro? (Would like to run in full screen mode and automatically close and return to Excel at the end of the clip) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Hi David,
Private Declare Function mciSendString Lib "winmm.dll" _ Alias "mciSendStringA" (ByVal lpstrCommand As String _ , ByVal lpstrReturnString As Any, ByVal uReturnLength As Long _ , ByVal hwndCallback As Long) As Long Sub FullScreenAvi() Const aviFile = "C:\Clock.avi" ' Modify as appropriate Dim Cmd As String Cmd = "play " & aviFile & " fullscreen " mciSendString Cmd, 0&, 0, 0& End Sub Regards; MP "David" a écrit dans le message de ... Greetings and TIA for your help. Anyone got VBA code sugestions for opening and running a Windows AVI file from and excel macro? (Would like to run in full screen mode and automatically close and return to Excel at the end of the clip) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Michael
Thanks for your respons When I run this macro nothing happens (no error messages). It just runs & quits without running the .avi file Would be grateful if you could have another look (does it run ok on your system? Thanks again |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Hi David,
Yes, this macro run ok on my system (Win98 + xl2002) but y only tested it with small avi (<500ko). Regards, MP "David" a écrit dans le message de ... Michael, Thanks for your response When I run this macro nothing happens (no error messages). It just runs & quits without running the .avi file. Would be grateful if you could have another look (does it run ok on your system?) Thanks again |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Hi David,
I tested with WinXP and that work too. MP "David" a écrit dans le message de ... Michael, Thanks for your response When I run this macro nothing happens (no error messages). It just runs & quits without running the .avi file. Would be grateful if you could have another look (does it run ok on your system?) Thanks again |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Hey guys....
I have been following your thread and the AVI macro is fantastic.... Do you have one that will run in a child window, whereas the spreadsheet is visible while it runs.... thanks.. seya ste |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Hi ste mac,
' In standard module: Public Play As Boolean Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength _ As Long, ByVal hwndCallback As Long) As Long Private Returnstring As String Sub AVI_Play() Const FileName As String = "c:\mybestfile.avi" If Dir(FileName) = "" Then Exit Sub If Play Then AVI_Stop Returnstring = Space(127) mciSendString "open " & Chr(34) & FileName & Chr(34) _ & " type avivideo alias video", Returnstring, 127, 0 mciSendString "set video time format ms", Returnstring, 127, 0 mciSendString "play video from 0", Returnstring, 127, 0 Play = True End Sub Sub AVI_Stop() mciSendString "close video", Returnstring, 127, 0 Play = False End Sub 'In ThisWorkbook module: Private Sub Workbook_BeforeClose(Cancel As Boolean) If Play Then AVI_Stop End Sub Regards, MP "ste mac" a écrit dans le message de om... Hey guys.... I have been following your thread and the AVI macro is fantastic.... Do you have one that will run in a child window, whereas the spreadsheet is visible while it runs.... thanks.. seya ste |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Michel, thankyou very much for you macro, just what I needed...
I will use it right away... I didn't know you had answered my post! for some reason my page didn't refresh and I have posted a question based on you macro to this newsgroup, so don't be surprised if you see another post refeering to your code <g Thanks Michel seeya ste |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running .avi files
Code does not work on m
excel 97 sp win2000 sp 4 will try at home of diff rig, nice code though |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop Excel from opening all files w/macros & running them | Excel Discussion (Misc queries) | |||
Excel Files being opened on a Computer running Vista | Excel Discussion (Misc queries) | |||
Running Virus Scan Slowing down opening files | Excel Discussion (Misc queries) | |||
Excel files on local drives running from internet | Excel Worksheet Functions | |||
running macros in downloaded files | Excel Programming |