Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

Time loop.

I want to create a do untill loop in vba, which will take hours as input and continue with steps in the loop till the until criteria is met. Below the code I have so far

dim inout
Dim timenow

inout = 24  'time in hours.

timenow = Now()


Do Until i = timenow + inout
Loop

It does not work..someone has better idea??

Thank you in advance.
ASKER CERTIFIED SOLUTION
Avatar of Harisha M G
Harisha M G
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aiysha

ASKER

Hi Harish,
Thank you for helping me with the code. Do while worked better than do until..

Thanks :)

Yes.. that should have been While .... Wend