VBA: Textbox new/next line

前端 未结 1 977
醉酒成梦
醉酒成梦 2021-01-28 23:05

I need some help with my textbox. My Textbox content is being fed by a cell value. Now the construction of the cell value goes like this: \"(date comments)\" and it happens prog

相关标签:
1条回答
  • 2021-01-28 23:45

    Set the multiline property of the textbox = true

    And you may have to set the ScrollBars property to 2-frmScrollBarsVertical

    Then separate the values by a vbCrLf

    "somecomment" & vbCrLf & "somecomment" & vbCrLf & "somecomment"
    

    These are the options for newlines depending on what you are doing.

    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
    
    0 讨论(0)
提交回复
热议问题