Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Do Loop Until  problem (Won't Stop)

Posted on 2004-04-28
2
Medium Priority
?
293 Views
Last Modified: 2011-10-03
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
0
Comment
Question by:EuropePT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
bwdowhan earned 500 total points
ID: 10944704
What if you change the (startTime = endTime) to (startTime >= endTime)..

on the minute2 questions: If ((minute2 = 20) or (minute2 = 50)) Then

~Brian
0
 

Author Comment

by:EuropePT
ID: 10944766
Great Thanks!! Both Works!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question