Discussion Board for collaboration on QlikView Scripting.
I wrote vbscript macro that export data to excel.
When running the macro from the "edit module" screen (by clicking on the "Test" button") it works.
I'm trying to call my function from the loading script.
I tried to write the macro as a procedure (with SUB, END SUB) and call from script with "CALL" - but it throws "script line error" message.
I tried to write the macro as a function (with Function, END Function) and call from script with SET var = MyFunc() or with LOAD MyFunc(), but no data was exported.
How should I call my macro? Does there is any security issue?
I read all discussions about this issue and tried to do everything but it still doesn't work...
Can someone please advise? thanks!!!
have you tried with button and trigger,
create a button and add action on button, "run a macro" an see if it works...
During the load it didn't exist the ActiveDocument and all methods which needs this basic-point will fail. Instead you could use a PostReload-Trigger.
Your function method should work.
using this module / vbs-function:
hope this helps
Check this there is an example in this link
Calling VB function (macro) in Load script to find common string length in two strings
Thank you all for your help!!!! I used Marcus_Sommer suggestion (PostReload-Trigger) and it's working!
please mark your thread as answered.