David, I just joined this group today, but I think I might have a solution for you.
First, you'll need to make a Public Declaration: Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Next, the following private sub Sub Sleep_5_Seconds() Sleep (5000) End Sub You can set the millisecond value to whatever you need to pause your VBA code. Just place Sleep_5_Seconds in your loop code where you need it to pause, allowing the data to flow in, financial I assume. I use it to stop the execution of the VBA code while Outlook takes over for a few seconds, then resume. I hope it helps! Paul On Jan 6, 1:57 pm, David Stubbs <davidmstu...@gmail.com> wrote: > Hello everyone, > > I have a loop in which at one point i need to draw data in via a > Bloomberg terminal. This always takes a few seconds to achieve this. > Without any pause, the operation is not completed before the next step > (which is to copy and paste special the data somewhere else) goes > ahead. This means that the loop is not getting new data every time the > loop goes around as i want it. I tried to give it time to allow the > Bloomberg data to be drawn in using this code: > > Sub KillSomeTime10() > > Dim PauseTime, Start > PauseTime = 10 ' Set duration in seconds > Start = Timer ' Set start time. > Do While Timer < Start + PauseTime > Loop > > End Sub > > But this seems to pause everything, including the Bloomberg data draw > in process, so at the end of the pause the data is still not drawn in. > > I need some way to pause my code but in that time still allow the > Bloomberg data to be drawn in. > > Any help would be greatly appreciated > > David -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel