Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
I'm trying to reload using scheduler QlikView document containing two macros. Macros are used to count files in folder and delete files. Here is example of macro's code:
public function DeleteFile(filePath)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim retVal 'as Boolean
If objFSO.FileExists(filePath) Then
Call objFSO.DeleteFile(filePath)
retVal = true
Else
Set objFSO = nothing
retVal = false
End If
DeleteFile = retVal
end function
Locally those macros work fine. But when document is refreshed by scheduler I got general error as a result.
Is there any workaround to launch document on server ?
Regards.
M
When I reload it by opening document and hitting ctrl + R.
Hi.
Have you checked a simple function containing one line 'DeleteFile = true' ?
The CreateObject("Scripting.FileSystemObject") call requires your module to have System Access. To get System Access from the command line, you have to add the switch /NoSecurity.
QV.exe /r /NoSecurity path_to_qv_file
-Rob
Thanks Rob,
Now it works like a charm.