参考
Dim sdt As Date = Date.NowWhile Date.Now < sdt.AddSeconds(10) '等到10秒 Application.DoEventsEnd Whilemsgbox(3)