Private Sub Text0_AfterUpdate()
If MsgBox("将触发组合框的刷新事件,你要继续吗?", vbYesNo) = vbYes Then
Me.Combo2.Requery
End If
End Sub作者: glw 时间: 2006-1-22 08:47
不知这个可否参考
Private Declare Function OpenProcess Lib "kernel32.dll" (ByVal _
dwAccess As Long, ByVal fInherit As Integer, ByVal hObject _
As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal _
hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal _
hObject As Long) As Long
Function LaunchApp32 (MYAppname As String) As Integer
On Error Resume Next
Const SYNCHRONIZE = 1048576
Const INFINITE = -1&
Dim ProcessID&
Dim ProcessHandle&
Dim Ret&
LaunchApp32=-1
ProcessID = Shell(MyAppName, vbNormalFocus)
If ProcessID<>0 then
ProcessHandle = OpenProcess(SYNCHRONIZE, True, ProcessID&)
Ret = WaitForSingleObject(ProcessHandle, INFINITE)
Ret = CloseHandle(ProcessHandle)
MsgBox "This code waited to execute until " _
& MyAppName & " Finished",64
Else
MsgBox "ERROR : Unable to start " & MyAppname
LaunchApp32=0
End If
End Function