0

In VBA Excel, I have created a timed message box using the WScript.Shell .Popup method, but for some reason my message box will not close after the pre-determined 3 seconds. Any clues what I'm doing wrong? Thanks!

Dim TimedMsgBox As Object
Dim MsgBoxText As String
Dim timeDelay As Integer
timeDelay = 3
MsgBoxText = "Sorry, but the tab for " & WS.Name & " is protected; rerun this macro after unprotecting it."
Set TimedMsgBox = CreateObject("WScript.Shell")
TimedMsgBox.Popup MsgBoxText, timeDelay, "Warning", 48
makae90
  • 33
  • 4

0 Answers0