Results 1 to 2 of 2

Thread: [RESOLVED] Sleep function in a module?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    55

    Resolved [RESOLVED] Sleep function in a module?

    Hi everyone,
    I'm trying to write a function that uses the "Sleep" command, but when I call the function VB crashes (it stops responding)! My code looks like this:

    Code:
    Option Explicit
    
    Declare Function Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    Function Test()
    
    Dim a As Integer
    
    For a = 0 To 10
        Sleep 1000
        MsgBox ""
    Next a
    
    End Function
    Please help me anyone!
    //¤dark
    Dinmamma.Fat = True

  2. #2

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    55

    Re: Sleep function in a module?

    Sry, I found it out myself! It has to be "sub" and not "function". sorry! :$

    Resolved!
    //¤dark
    Dinmamma.Fat = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width