Solved how to i get the finished time of one shell command

January 6, 2014 at 03:39:33
Specs: Windows 7, core 2 duo
i am using a shell command for one project but i have to wait until that process finished then come back to vba and then run the next set of program lines. How do i do this ? please help me thanks for your reply

See More: how to i get the finished time of one shell command

Report •

January 6, 2014 at 19:56:38
Not real sure, but maybe:
START /W "command"

Report •

January 7, 2014 at 04:16:52
You could also try call instead of start if you are begining a process in a program that is starting a batch process.

sigh jumped ahead, thought it was a batch process, apologies did not notice the vba

message edited by mikelinus

Report •

January 8, 2014 at 04:08:31
✔ Best Answer
The command suggested by nbrane is slightly incorrect (/W switch nullifies the multitasking effect). use instead

start "" "command"

Don't miss the "" after start otherwise nothing works.

Report •

Related Solutions

January 8, 2014 at 07:53:53
What are you trying to do? It sounds like you're going about it the wrong way.

How To Ask Questions The Smart Way

Report •

January 8, 2014 at 20:02:39
Ha ha, Ivo was right, that was a hash, although from the /? it looked right. I dropped back to this attempt which is vbscript, but might work also in VBA? (I can never keep track of what works in what):
'===== begin snippet/test
set ws=createobject("")
wscript.echo time "myprocess.exe",4,True
wscript.echo time
'== end snip
Theoretically, the difference in reported times should reflect the run-life of your process.

Report •

January 11, 2014 at 11:30:16
Store the time as the very last action of the shell command

Hi there.

Report •

Ask Question