英文:
Display lines in msgbox with spaces between them
问题
我试图通过Msgbox
函数在我的代码中显示一些行。为了使其更易读,我需要在它们之间用空格分隔行。这是否可能?
当然,我使用& Chr(10) & _
来创建新的行。但是它们之间的空格怎么办 - 我不知道。
英文:
I'm trying to display some lines in my code via the Msgbox
function. And in order to make it more readable I need lines to be separated with spaces between them. Is it possible ?
Of course I used & Chr(10) & _
to make a new line. But what about spaces between them - no idea.
答案1
得分: 2
根据文档,您可以使用:
MsgBox "文本A" & vbCrLf & "文本B"
来“强制”换行。结果是:
英文:
According to the docs, you can use:
MsgBox "TextA" & vbCrLf & "TextB"
to "force" a Line Break. The result is:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论