Add delay into Loop in VBA without locking Excel

theglitch

New Member
Joined
Jan 3, 2018
Messages
5
Hi Experts,

I have searched the site and others but I can't seem to find a way to do what I am trying to do.

- I have a Macro that runs another Program and needs to run one by one down the Excel file.
- The Macro runs the file fine, but the Program writes back to Excel values that I need for the next run
- I need the next run to be delayed till the values are written back into the Excel file (I am using a Loop for the repetitive runs)(2 min delay)
-

I tried application.wait and others but it locks Excel from writing back. I am not sure how to do the While loop in a loop it keeps giving errors. Any help would be greatly appreciated.

Do Until LoopCount = 0

Other Program Stuff

Delay Needed Here (I think)

Loop

MsgBox "All done!"


Exit Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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