Unanswered: 'WriteLine' Function Problems With Large String
I have a code I wrote that is supposed to write a tab-delimited text string to a text file. It worked flawlessly when there were only 2 rows (header and one order record) but when there are many orders and I try to run I get "Run-time error '5' ". The help says it is probably because the string is outside the range allowed by the WriteLine function.
Does anyone have any ideas for how to fix this problem? Is there a different function I should use or should I do something differently with this function. Please Let me know what I am doing wrong and if possible include a sample code if you think you might have a solution.
This would solve so many problems if I could get it to work. Thanks in advance! Joshua
'THIS GETS THE RESPONSE FROM AMAZON
Dim Response As String
Response = API.ResponseText
'THIS SHOULD WRITE THE RESPONSE TO A TEXT FILE
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\AmazonTempText1.txt", True) 'True for overwrite
a.WriteLine (Response) 'Debug goes to this line, file is created but empty