Using MsgBox without pausing the application

后端 未结 7 950
一向
一向 2020-12-16 14:05

I need to display a message to the user. When I do this using MsgBox, the program stops until the user clicks the box away. I\'d like to know if there\'s a way

7条回答
  •  天命终不由人
    2020-12-16 14:22

    Sounds like you're not expecting any user input from the MsgBox. In this case, depending on your application, the StatusBar may be an adequate substitute.

    In Excel this is easy:

    Application.StatusBar = "Please be patient..."
    Application.StatusBar = iDone & " of " & iTotal & " items done."
    

    To clear the StatusBar when done:

    Application.StatusBar = False
    

    In Access, the syntax is a tiny bit more convoluted:

    Temp = SysCmd(acSysCmdSetStatus, "Hey, look at me!") ' Puts out your message
    Temp = SysCmd(acSysCmdClearStatus) ' Clears StatusBar
    

提交回复
热议问题