It would be possible to create a string that has more than 256 characters in VBA

Asked

Viewed 123 times

0

Can a variable of type string and need to save around 1k of words to send as parameter to a database, I would like to know how to do this.

Actualemente meets thus my variable:

Dim variavel As String

I tried to insert more than 1k of data but it cuts, I believe it is the limitation of 256 bits/ words, I do not know how VBA works with it.

PS. I cannot put in an external file as there is lock, it would just in variable same.

  • Searching, I found a post explaining that the Debugger displays only 255 characters, but the string itself has more. Have you checked through the size of it if this is your case? Post cited: https://stackoverflow.com/a/43040827/8839059

  • I checked this and yes, you are correct, it just displays 255 but it itself keeps more. Thank you very much

  • Create a form (Userform) and insert the testo in a popup form and not with Msgbox, you should create your own Msgbox

1 answer

0

After searching I found that Msgbox, or other Debug displays only 255 characters, but the variable itself supports more.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.