Excel/Delay a macro

Advertisement


Question
Hello,

Is it possible to delay a macro at any stage. I have a macro which does 12 steps, I would like to hold the macro at step 6 for a minute and then start with step 7. At step 6, my excel sheet needs to get updated from another terminal.

Thank you in advance,
Manoj.

Answer
There are various ways of pausing a macro - you could simply insert a message box asking the user to press OK once completed - this would suspend the macro indefinitely until that action happened.  You could use a while...wend loop to check for a cell changing - so for example, your data updates a last updated field, check for that changing.  you could use a timer event - for example see  http://stackoverflow.com/questions/1544526/how-to-pause-for-specific-amount-of-t .  

I hope this gives you some ideas of ways to achieve what you want.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Aidan Heritage

Expertise

I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!

Experience

My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

Education/Credentials
I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2016 About.com. All rights reserved.