• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

refresh worksheet code for a VBA loop


Excel Ninja
It's me ... again.
You wrote today that this ... same looking thread is duplicated:
which You have added already here
Is this someway different than above thread?


New Member

I am not sure what it is you want, as its not clear in your post. You could try something like this

This code waits 10 seconds you could change it to ("0:15:00")) to wait 15mins
Application.Wait(Now + TimeValue("0:00:10"))
OR this

If Application.Wait(Now + TimeValue("0:00:10")) Then
 MsgBox "Please click Refresh Button for latest update"
End If
This code waits 10 seconds and then a message box pops up. You can change the time to wait.

For both codes - If you place either code BEFORE Next i in you code the NEXT loop will not take place until the time has run out. If you place either code AFTER the Next i in your code then you code will keep looping until the wait time has been reached and then stop for the allotted time and then restart the loops.

For the second code, the message box will most likley need to be cleared before the code restarts.

Not sure if this is what you are after

YOU ONLY NEED ONE NOT BOTH, if this is what you are after