testing2

barryt

New Member
Joined
Apr 15, 2002
Messages
15
I have two shell commands right after each other

To make things simple lets say the old.txt is a static file that doesn’t change and is made already

The first shell with the old.txt info when it runs it makes the old2.txt
Shell "Command.com < old.txt" ‘This line runs and it makes old2.txt file
Shell "Command.com < old2.txt"

The Problem is excel run the command.com <old.txt
Then it runs the command.com<old2.txt
But the old2.txt hasn’t been made yet


What works kind of which I don’t want to use is putting this next couple statements between the two shell “command.com”
Making a for aloop = 1 to 10000000
Next a

What I want to do is change the default of the shell function to have it wait until the shell “command.com” is finished
I think I found on the msn some info on how to do it but I haven’t been able to find that info again
Or maybe if was for a different language
I tried what I remembered it said but I didn’t have any luck


This is some text from help in excel
Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.

Thanks
Barry
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top