Hi guys,
I'm handling a website .responestext in excel, which is more than the 32767 character limit for strings in VBA.
Is there a workaround to this, other then splitting the responsetext up in more than 1 string?
Thanks in advance for any reply.
Hi guys,
I'm handling a website .responestext in excel, which is more than the 32767 character limit for strings in VBA.
Is there a workaround to this, other then splitting the responsetext up in more than 1 string?
Thanks in advance for any reply.
Please click the * below if this helps
that character limit is for cells, not String variables in VBA
Josie
if at first you don't succeed try doing it the way your wife told you to
Hi Joseph,
I'd think so too, but if I most the .responstext to a string called "rtext" and then look at the string, I cannot find the reference I'm looking for.
If I do as follows :
Then my reference is found in rtext2, which led me to believe there's a 32767 character limit...Please Login or Register to view this content.
(It's worksheetcode and not in a module)
What am I missing here?
Hi,
As far as I'm aware the string limit in VBA is 2^31.
Are you really asking about the cell limit for characters in the Excel application which is indeed 32767.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Hi Richard,
thanks so much for your reply.
Indeed, I was under the same impression. Weirdly enough, I nowhere put the .responsetext in any cell / worksheet. I only handle it in the code.
I'm using Office Standard 2010.
It really doesn't make sense to me, but if there's no direct solution, I'll just split the responsetext over several strings, I guess
Thanks!
how are you searching the string? have you tested the length of the string variable using len?
Jasper:
You can run something like this to show that the 32767 limit doesn't apply:
Please Login or Register to view this content.
Hi Joseph,
once you said "how are you searching the string", you put the finger on the sore spot which I had missed.
I was using Instr, which I then referred to ... an integer....
I changed this into LONG and it's working fine... Stupid me.
Thanks for shaking up my brain and sorry for wasting your time, guys!
@ Jasper
Don't beat yourself up. We've all been there and got many T shirts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks