Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've a macro for exporting an excel file which works fine when I run the script manually.
When I add it to a postreload trigger, it doesn't.
I've checked the document properties -- security --> Export allowed
Also under user preferences --> security --> Module and File are checked
Any idea suggestions why the macro doesn't seem to work as a postreload?
Regards,
Guido
I've added this as the first macro:
sub x
msgbox "start"
msgbox "mid"
msgbox "end"
end sub
and then ran the script. I didn't get any messages so it seems like the macro's don't run at all.
Take another look to the above provided links to the there mentioned security settings.
- Marcus
I think these should be the settings. It's in Dutch, but it's Exports allowed and Macro security cancelled:
And Module and File are allowed.
By the user-properties enable all unless the last one.
I've changed the settings but still no excel export.
Just to be sure - no Excel and QV is running, means no open files or any other instances of the tools could impact the task. Then you starts the batch-file manually - what happens? Open + reload then will be a msgbox displayed?
- Marcus
Excel and QV are closed. I run the bat file and a cmd window opens, the window is empty.
Then QV opens and the reload starts.
That's it. QV stays open and the cmd window is still empty.
The within the OnPostReload trigger specified macro is the correct one - also from the spelling?
To exclude that anything prevents the displaying of the msgbox popup's (they might be also hiden or outside of the screen) change/add to a selection-statement like:
ActiveDocument.Fields("Year").Select 2019
or something similar - you should now see the new set selection.
- Marcus
I have only 1 macro in the whole document.
When I run it manually, I see the message.
I've added a filter in the statement like you suggested, but it doesn't change when I run it with the script. It does change when I run the macro manually.
Some setting prevents the macro-execution. Within the script-editor in the bottom left area there are multiple buttons like Data, Functions, Variables and Properties - within the properties are also options for the execution of external programs.
Another trial would be to remove (with backup) or a renaming of the Qlikview settings.ini in:
C:\Users\YourUser\AppData\Roaming\QlikTech\QlikView
and now you should be asked if you want to execute any macros.
- Marcus