如何创建多行输入框

Posted

技术标签:

【中文标题】如何创建多行输入框【英文标题】:How can I create a multi-line input box 【发布时间】:2016-12-08 04:17:09 【问题描述】:

我正在尝试在 VB6 中创建一个输入框,我可以在其中在提示符中包含空格。我试图用 MSGBOX 做同样的事情,但它不允许我做 VBCRLF。这就是我想做的事情

This company has more than 1 department.
For Accounting type 1
For Reasearch  type 2

这里的输入框和右边的OK和CANCEL

【问题讨论】:

【参考方案1】:

以下代码将显示多行提示字符串:

Dim ret As String
Dim prompt As String

prompt = "This company has more than 1 department." & vbCrLf & _
    "For Accounting type 1" & vbCrLf & _
    "For Reasearch  type 2"


ret = InputBox$(prompt)

【讨论】:

以上是关于如何创建多行输入框的主要内容,如果未能解决你的问题,请参考以下文章