So I have some code to sort through some output from an API and extract information into a spreadsheet. The problem is the maximum amount of characters I can set some string variable seems to be around 26513 characters (found using debug.print Len(my-oversized-string). Now is there a way in Excel 2010 to extend how much data a string can hold? I would ideally need my string to hold at least 3,500,000 characters. Is this possible or should I approach this problem from a different way?
The error message I get is subscript out of range and sParagraph = Paragraph(i) is highlighted after clicking debug.
Thanks for your help! Justin
Dim URL As String: URL = "someAPIurlputhere"
Dim Http As New WinHttpRequest
Http.Open "GET", URL, False
Http.Send
Dim Resp As String: Resp = Http.ResponseText
Dim Paragraph As Variant
Debug.Print Len(Resp)
For i = 1 To 365
Paragraph = Split(Resp, "date")
ActiveCell.Offset(1, 0).Activate
ActiveCell.Range("A1:E1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Dim sParagraph As String: sParagraph = Paragraph(i)
Dim Lines As Variant: Lines = Split(sParagraph, ",")
ActiveCell.Offset(0, 1).FormulaR1C1 = Lines(0)
ActiveCell.Offset(0, 2).FormulaR1C1 = Lines(9)
ActiveCell.Offset(0, 3).FormulaR1C1 = Lines(27)
ActiveCell.Offset(0, 4).FormulaR1C1 = Lines(29)
Erase Paragraph
Next i