|
-
March 28th, 2001, 08:38 AM
#1
Waiting untill a function ends
hi,
i have a program in which i have to send several mails. so i have a for loop with the function "send". Now i would like to say that the loop has to wait untill the previous send has finished. Can i do this.
In other words is there an opposit function to DoEvents?
Thanx
-
March 28th, 2001, 09:04 AM
#2
Re: Waiting untill a function ends
Try the following API's:
private Declare Function OpenProcess Lib "kernel32" (byval dwDesiredAccess as Long, byval bInheritHandle as Long, byval dwProcessId as Long) as Long
private Declare Function WaitForSingleObject Lib "kernel32" (byval hHandle as Long, byval dwMilliseconds as Long) as Long
private Const SYNCHRONIZE = &H100000
private Const INFINITE = &HFFFF
-
March 28th, 2001, 09:19 AM
#3
Re: Waiting untill a function ends
Function MyFunc()
Dim myObject As Object
Dim RetVal As Variant
Set myObject = CreateObject("WScript.Shell")
RetVal = myObject.Run("c:\windows\notepad.exe", 1, True)
MsgBox "Notepad is closed"
End Function
'TRue - wait until proc is over
'False don't wait
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|