Private withevents M_Conn as adodb.connectionPrivate CmdFinished as booleansub somesub AdoCmd.Execute , , adAsyncExecute do while not CmdFinished doevents loopend sub'Change the CmdFinished value on the connection_ExecuteComplete event and connection_WillExecutePrivate Sub M_Conn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection) CmdFinished = TrueEnd SubPrivate Sub M_Conn_WillExecute(Source As String, CursorType As ADODB.CursorTypeEnum, LockType As ADODB.LockTypeEnum, Options As Long, adStatus As ADODB.EventStatusEnum,ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection) CmdFinished = FalseEnd Sub