I would like to show Msg Box with "Done" after completing refreshing connection. Unfortunately the message pops up righ after starting macro, when connection is not fully refreshed (it is ODBC connection, it takes up to 15 minutes to fully refresh). Solution with do and without DoEvents ends with the same result. Could you help?
Sub database_refresh()
Dim cn As WorkbookConnection
Set cn = ActiveWorkbook.Connections("xxxx")
cn.Refresh
End Sub
Sub msg_box_dbup()
MsgBox "Done"
End Sub
Sub database_refresh_event()
Call database_refresh
DoEvents
Call msg_box_dbup
End Sub