Closed Magicmercury closed 4 years ago
You probably need to use the full path to the file.
From: Magicmercury notifications@github.com Sent: Friday, May 29, 2020, 9:58 AM To: VBA-tools/VBA-JSON Cc: Subscribed Subject: [VBA-tools/VBA-JSON] OpenTextFile Problem (#170)
I´ve trying to start a little bit testing but i have a big problem. I can´t read a file.
`Public Sub exceljson() Dim FSO As New FileSystemObject Dim JsonTS As TextStream Dim JsonText As String Dim Parsed As Dictionary
' Read .json file Set JsonTS = FSO.OpenTextFile("example.json", ForReading) JsonText = JsonTS.ReadAll JsonTS.Close End Sub`
I got the Error at the line Set JsonTS - Can´t find a file. But the file is in the same folder.
What did I wrong?
Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/VBA-tools/VBA-JSON/issues/170, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIKTRA7UWTI76TPJ5ZWM443RT65O3ANCNFSM4NOB74QA.
Sorry...your are right, I make a huge mistake..
I´ve trying to start a little bit testing but i have a big problem. I can´t read a file.
`Public Sub exceljson() Dim FSO As New FileSystemObject Dim JsonTS As TextStream Dim JsonText As String Dim Parsed As Dictionary
' Read .json file Set JsonTS = FSO.OpenTextFile("example.json", ForReading) JsonText = JsonTS.ReadAll JsonTS.Close End Sub`
I got the Error at the line Set JsonTS - Can´t find a file. But the file is in the same folder.
What did I wrong?
Thanks