在`msgbox`中显示带有空格分隔的行。

huangapple go评论54阅读模式
英文:

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"

来“强制”换行。结果是:

在`msgbox`中显示带有空格分隔的行。

英文:

According to the docs, you can use:

MsgBox "TextA" & vbCrLf & "TextB"

to "force" a Line Break. The result is:

在`msgbox`中显示带有空格分隔的行。

huangapple
  • 本文由 发表于 2023年4月4日 08:08:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75924572.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定