Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have an automated Excel routine I run on a PC, but the one problem I have is
that if Excel is already open I get an error if it tries to open excel again. Is there a way to make sure Excel is closed from a Command Prompt in my Batch File? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Al,
Al Franz wrote: Have an automated Excel routine I run on a PC, but the one problem I have is that if Excel is already open I get an error if it tries to open excel again. Is there a way to make sure Excel is closed from a Command Prompt in my Batch File? IMO it would be better to figure out why this is happening instead of killing Excel. But if you must terminate a process from a batch file, here's how you could do it: taskkill /F /IM EXCEL.EXE Note - this will kill Excel just like it would if you killed it from task manager, so you'll lose anything you had open and unsaved. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is taskkill available in all versions of windows?
(Or better, what version of windows are you running?) It wasn't found in WinXP Home edition. Jake Marx wrote: Hi Al, Al Franz wrote: Have an automated Excel routine I run on a PC, but the one problem I have is that if Excel is already open I get an error if it tries to open excel again. Is there a way to make sure Excel is closed from a Command Prompt in my Batch File? IMO it would be better to figure out why this is happening instead of killing Excel. But if you must terminate a process from a batch file, here's how you could do it: taskkill /F /IM EXCEL.EXE Note - this will kill Excel just like it would if you killed it from task manager, so you'll lose anything you had open and unsaved. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave Peterson wrote:
Is taskkill available in all versions of windows? (Or better, what version of windows are you running?) It wasn't found in WinXP Home edition. Interesting...I don't know. I'm running XP Pro SP2. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
According to ITWorld.com, TaskKill is only included in XP Pro.
-- Scott "Jake Marx" wrote: Dave Peterson wrote: Is taskkill available in all versions of windows? (Or better, what version of windows are you running?) It wasn't found in WinXP Home edition. Interesting...I don't know. I'm running XP Pro SP2. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File/Close automatically saving changes without prompt | Excel Discussion (Misc queries) | |||
Macro to close workbook with prompt | Excel Worksheet Functions | |||
Macro to Prompt User to Close After Saving | Excel Discussion (Misc queries) | |||
Save Changes Prompt at close | Excel Discussion (Misc queries) | |||
Excel close/save/prompt problem | Excel Programming |