Link to home
Start Free TrialLog in
Avatar of EuropePT
EuropePT

asked on

Do Loop Until problem (Won't Stop)

Hi
I have a problem

Question 1

My loop won't stoppp

Dim startTime As Date
Dim endTime As Date
startTime = "9:30:00"
endTime = "18:00:00"

Do
blah
blah
startTime = startTime + "0:10:00"
Loop Until (startTime = endTime)

It won't stop?

Question 2

minute2 = DatePart("n", startTime)

If minute2 = 20 Or 50 Then
blah
blah
else
blah
blah
End If

The above works if the if statement is only looking for 20 . After I put the Or in it it  just keep staying on the top and won't go to else.
Any idea why?

Thanks

Please help
ASKER CERTIFIED SOLUTION
Avatar of bwdowhan
bwdowhan

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 EuropePT
EuropePT

ASKER

Great Thanks!! Both Works!