参考代码
Dim sdt As Date = Date.NowWhile Date.Now < sdt.AddSeconds(10) Application.DoEventsEnd While
msgbox("10秒后执行")