Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi @All,
i want to read the input of a .txt file into a variable in my vba macro script.
In line 2 the fso Object is empty ? I don't know why ? So the rest of my script can' work, because i need the fso Object
Ok thanks, i have the solution.
So I didn't knew that there are a difference between VBA and VBScript.
Like Mr. Zeeman explains, the QlikView Macro only supports VBScript.
So in the past i had VBA Commands in my code, and so it doesn't function.
Here my solution
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Test.txt", ForReading)
Do Until objFile.AtEndOfStream
strSearchString = objFile.ReadLine
Loop
objFile.Close