Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I open an application via this code that works fine Sub LaunchCaptureExpress() Dim RetVal As Long RetVal = Shell("C:\Program Files\Capture Express\capexp.exe", vbNormalFocus) End Sub How do i close it??? I was given the following solution by "chijanzen", but i get an error message " AciveX does'nt support object" that refers to "Set WshShell = CreateObject("Wscript.Shell")" close the Windows after 10 seconds Sub LaunchCaptureExpress() Dim WshShell As Object Dim oExec As Object Set WshShell = CreateObject("Wscript.Shell") Set oExec = WshShell.Exec("C:\Program Files\Capture Express\capexp.exe") DoEvents Application.Wait (Now + TimeValue("0:00:10")) oExec.Terminate Set WshShell = Nothing Set oExec = Nothing End Sub Could you help? Thanks a lot |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Close an application? | Excel Programming | |||
Repost Excel Crashes on Workbook close!! | Excel Programming | |||
Close the other application | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
Application.Close | Excel Programming |