Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VBA:文本框新建/下一行_Vba_Excel - Fatal编程技术网

VBA:文本框新建/下一行

VBA:文本框新建/下一行,vba,excel,Vba,Excel,我的文本框需要一些帮助。我的文本框内容由单元格值提供。现在单元格值的构造是这样的:“(日期注释)”并且它是逐步发生的,我可以有多个这样的条目 基本上,我希望我的文本框在我的用户表单中的文本框中将每个值显示为一行,使它们看起来像一个项目符号列表 这可能吗?我想检测每个右括号符号“)”然后转到下一行?但我无法确定如何对其进行实际编码。将textbox的多行属性设置为true 您可能需要将ScrollBars属性设置为2-frmScrollBarsVertical 然后用vbCrLf分隔这些值 "so

我的文本框需要一些帮助。我的文本框内容由单元格值提供。现在单元格值的构造是这样的:“(日期注释)”并且它是逐步发生的,我可以有多个这样的条目

基本上,我希望我的文本框在我的用户表单中的文本框中将每个值显示为一行,使它们看起来像一个项目符号列表


这可能吗?我想检测每个右括号符号“)”然后转到下一行?但我无法确定如何对其进行实际编码。

将textbox的多行属性设置为true

您可能需要将ScrollBars属性设置为2-frmScrollBarsVertical

然后用vbCrLf分隔这些值

"somecomment" & vbCrLf & "somecomment" & vbCrLf & "somecomment"
这些是换行符的选项,具体取决于您正在执行的操作

Constant    Equivalent          Description
vbCrLf      Chr(13) + Chr(10)   Carriage return–linefeed combination
vbCr        Chr(13)             Carriage return character
vbLf        Chr(10)             Linefeed character
vbNewLine   Chr(13) + Chr(10)    or, on the Macintosh, Chr(13)  Platform-specific new line character; whichever is appropriate for current platform