Overcome VBA InputBox Character Limit

前端 未结 3 907
孤街浪徒
孤街浪徒 2021-01-13 05:10

The current function I use to collect text InputBox can\'t accept more than 255 characters apparently, and I need to be able to collect more than that? Is there a parameter

3条回答
  •  無奈伤痛
    2021-01-13 05:54

    To be pedantic, the Inputbox will let you type up to 255 characters, but it will only return 254 characters.

    Beyond that, yes, you'll need to create a simple form with a textbox. Then just make a little "helper function" something like:

    Function getBigInput(prompt As String) As String
        frmBigInputBox.Caption = prompt
        frmBigInputBox.Show
        getBigInput = frmBigInputBox.txtStuff.Text
    End Function
    

    or something like that...

提交回复
热议问题