1.简单的弹出一个消息
MsgBox ("Common Msg")

2.显示某个单元格的信息
MsgBox "Cell A1 is " & Range("A1").Value

3.加入换行
MsgBox "Line 1 Content" & vbNewLine & "Line 2 Content"

本文介绍了使用VBA中的MsgBox函数来实现不同场景的消息提示,包括简单的消息提示、显示单元格内容及换行显示多条信息的方法。
1.简单的弹出一个消息
MsgBox ("Common Msg")

2.显示某个单元格的信息
MsgBox "Cell A1 is " & Range("A1").Value

3.加入换行
MsgBox "Line 1 Content" & vbNewLine & "Line 2 Content"

5159

被折叠的 条评论
为什么被折叠?