LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default Task Manager (shut down a task if active)

Is there a way to close an application called "PDFCreator" if it happens to
be still active? The problem that I have in running PDFCreator is that it
doesn't always shut down before the next instance of running, and won't
create the PDF. I'm using code from Ken Puls website, and have coded in both
of his suggestions to shut it down and waittime, but it still creates
problems. I have to open the task manager and close PDFCreator manually,
which is a pain in the neck in automated code.

What I'd like to do is get VB to see if PDFCreator is running, and if it is
then shut it down, before running it again. Can VB access the task manager?
Is there anything that could be done with the following code (from VB help)?
Regards, Brett.

Application.Interactive = False
Application.DisplayAlerts = False
channelNumber = Application.DDEInitiate( _
app:="WinWord", _
topic:="C:\WINWORD\FORMLETR.DOC")
Application.DDEExecute channelNumber, "[FILEPRINT]"
Application.DDETerminate channelNumber
Application.DisplayAlerts = True
Application.Interactive = True

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB/VBA to read Task Manager todtown Excel Programming 3 December 27th 07 12:48 AM
VB/VBA to read Task Manager todtown Excel Programming 0 December 26th 07 10:58 PM
VB/VBA to read Task Manager todtown Excel Programming 0 December 26th 07 10:58 PM
dialog box for active cell task to speed repeditive task Todd F.[_2_] Excel Programming 3 August 9th 05 02:30 PM
Excel Remains Active in Windows Task Manager Philip Wybo Excel Programming 2 August 27th 03 09:30 AM


All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"