sleep help

Posted on 2006-06-01
Last Modified: 2010-04-30
does this look ok. i have an email blast that i need to sleep as it sends the mail. i am having trouble getting the wait to work. help!

this is the code i am using to test the idea
For i = 5 To 16
Private Sub Wait(1000)
    Dim lngTime As Long
    lngTime = Milliseconds
    While lngTime > 0
        Sleep 50
        lngTime = lngTime - 50
End Sub

Question by:jbrahy
    1 Comment
    LVL 28

    Accepted Solution

    So I suppose this is actually an ASP question?  If so, then you do not have direct access to either the Sleep API function, or the DoEvents function call.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now