Excel中除了MsgBox之外的消息提醒?

Mor*_*lst 2 excel alert vba excel-vba msgbox

除了MsgBox之外,还有另一种在Excel中显示消息的方法吗?

我在考虑安全警报/启用宏警报样式.我可以使用相同的空间来显示一些文字吗?

我试图通知用户,他们不需要单击按钮.

干杯

Mik*_*keD 6

如果要在用户不需要交互的情况下显示消息,可以创建用户表单并将其显示为无模式,这意味着在显示表单后,VBA的正常执行将继续.

示例(form ="UserMsgBox",label ="Label1")

Sub Test()
    UserMsgBox.Show vbModeless

    UserMsgBox.Label1.Caption = "This is my 1st message to you"
    UserMsgBox.Repaint
    Application.Wait Now + TimeValue("00:00:02")

    UserMsgBox.Label1.Caption = "This is my 2nd message to you"
    UserMsgBox.Repaint
    Application.Wait Now + TimeValue("00:00:02")

    UserMsgBox.Label1.Caption = "This is my 3rd and last message to you"
    UserMsgBox.Repaint
    Application.Wait Now + TimeValue("00:00:02")

    UserMsgBox.Hide

End Sub
Run Code Online (Sandbox Code Playgroud)

其次,您可以使用Excel在Excel应用程序窗口底部的状态栏区域中显示文本

Application.StatusBar = "My bottom line message to you"
Run Code Online (Sandbox Code Playgroud)