So..ok, I started a program with the shell command which returns the process ID number. How do you close the process using that ID number?
TIA
Grug
So..ok, I started a program with the shell command which returns the process ID number. How do you close the process using that ID number?
TIA
Grug
Hi this was posted at stackoverflow:
https://stackoverflow.com/questions/...rough-vba-code
Maybe it can help you
---
Hans
"IT" Always crosses your path!
May the (vba) code be with you... if it isn't; start debugging!
If you like my answer, Click the * below to say thank-you
I do wonder from the two examples if they are Windoze version specific or subject to change, but I'm guessing the process ID number returned is of no use to VBA then?
I think what you found is great starting point however --- thanks @Keebellah
The command to kill is the following:
Please Login or Register to view this content.
VBA help (F1):
It seems odd Excel VBA returns a process ID from the shell command and it isn't used (by VBA). However, I've never considered Excel (or anything else under the micro$oft name) to be a finished product...Please Login or Register to view this content.
What makes you say that? What process ID? IS it active?
Have you checked under de dos command prompt?
You're using one application to do something entirely different that what it's intended for.
Finished product?
IS your family car not an unfinished product because you cannot make it plow a cornfield?
Well, like I said, your previous solution looked entirely workable
This is arguable, but also an "in the eye of the beholder" thing. At face value, lets just say that if you can show me a native VBA command using the returned value of the shell command (other than non-zero which could have been implemented by micro$oft as a Boolean return value), and I'll concede I've made my previous "assertion" under false premise?You're using one application to do something entirely different that what it's intended for.
Thanks again,
Grug
Hi Grug,
Playing around a little, this code will retrieve the running tasks and list them in a file named PROCESSES.txt in your temp folder
You can use the output in for example a listbox to select the task you want to kill.Please Login or Register to view this content.
This thread has been marked as solved, but also reported as having gone off topic.
Steve - if there is something further you wish to know that hasn't been addressed by Keebellah, then please state it clearly here so that someone else can take a look and advise. I confess from reading the thread, I am not sure what that is, so you will need to provide clarification if you need further help.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks