display a 2 row message pop -up vba 6

浪子不回头ぞ 提交于 2019-12-23 17:46:12

问题


is there a way to display a 2 or 3 or 4 or n line message on a pop-up window in vba 6 ?

For the moment my pop-up window ( calling the MsgBox function) displays the message like this :

       You did something wrong. Please enter valid input.

and I want it to display the message like this

      You did something wrong. 
     Please enter valid input.

can you please provide a code sample?

many thx in advance, radu


回答1:


Just add a newline in your message:

MsgBox "Text 1" & vbNewLine & "text 2.



回答2:


Relatively easy request

    iResult = MsgBox("This information is on the first line. " & vbCrLf & "This information is on the 2nd line. " &vbCrLf & _
        "Do you wish to continue?", vbYesNo + vbInformation, "Message Box")


来源:https://stackoverflow.com/questions/5005188/display-a-2-row-message-pop-up-vba-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!