QlikTip #19: Suppressing Macro-Security (Module Security) Dialog on QlikView-Server/QlikView-Documents

When opening documents with macros the end-user will be shown a dialog to define the desired macro-security/module security (in the QlikView Windows Client or the QlikView IE Plugin):

The module script in this document contains code that accesses the system or applications outside QlikView. What security level do you want to give the macro module of this document.

But what, If you do not want that the end-user has to option to select the desired macro security/module security?
You can (e.g. as a system-administrator) globally enable the module-security at the highest level (“Allow any Macro (only for trusted documents)”) for every QlikView-Server you have by running the following script.
This script adds a registry entry to HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\:

'// **************************************************
'// Script for adding some registry keys to the current user profile/registry settings
'// for enabling the macro security/module security for the SERVER defined below
'// ~
'// Just configure the script by defining your server below
'// ~
'// The article explaining this script can be found at 
'// http://www.qlikblog.at/523/
'// **************************************************
Dim WshShell 'as Object

Set WshShell = WScript.CreateObject("WScript.Shell") 
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\", 1, "REG_SZ" 
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\", 1, "REG_SZ" 
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\ " & cSERVER_NAME, "", "REG_SZ" 

That’s it!
By doing so the end-user will never be asked again to choose the desired macro-security/module security.
You could for example run this script together with other logon scripts, it does not matter if you run this script multiple times!

Bookmark and Share

. Bookmark the permalink. Both comments and trackbacks are currently closed.


  1. Hector
    Posted January 27, 2010 at 23:21 | Permalink

    Question, about tip #19, do I have to include this script in every single qlikview document I publish in my server?


    • Posted January 29, 2010 at 13:08 | Permalink

      Hi Hector,

      no, this is a misunderstanding!!!!
      The script posted in this article is not to be used in QlikView-files!
      This is a script for adding some settings (keys) to the windows-registry!

      Maybe I have not mentioned this clearly in the article:
      You have to save the content in the script to a .vbs-file, then you can execute the file and the keys will be added to the registry.
      Before executing the VBScript-File do not forget to change the constand SERVER_NAME to your server!

      Hope this helps!

      Best regards

  2. Helmut
    Posted February 4, 2010 at 12:41 | Permalink

    Hi Stefan,

    do you also know a way to suppress the dialog when using OCX Clients?
    I seems to me that when using OCX as Client the “Always use this …” Option dosen’t work also.

    Best regards

  3. koff10
    Posted March 1, 2010 at 16:31 | Permalink

    Hi All,
    I’m looking for how do add user and setup security in Qlikview server.

  4. tylerwaterfall
    Posted April 29, 2010 at 19:21 | Permalink

    Is there a way to undo this setting? A backout plan in case somehow this change to the registry negatively affects the QlikView environment.

    Also, is the effect immediate or is a Server service restart needed?

    Thanks for posting this!

  5. Posted May 3, 2010 at 09:55 | Permalink

    great post as usual!

  6. Corine L
    Posted March 17, 2011 at 14:11 | Permalink

    Our users do not have administrator rights on their machines( no access to regedit). If on the first opening of the document, the user chooses the wrong option, is it possible to reprompt this pop-up that defines the security level of macros?

    • Posted March 24, 2011 at 21:08 | Permalink

      HI Corine,

      just have a look at the section “User Allowed Security Level” in QlikView’s Reference manual.


      • Brian Haas
        Posted March 29, 2011 at 18:06 | Permalink


        The “User Allowed Security Level” reference in the QlikView Reference manual does not mention any way to change this setting on Access Point (it just tells you how to set it in the Edit Module box of the qvw). If the end user has accidently chosen the wrong setting while using the document through Access Point, is there a way to reset their settings?

        Is there a way to suppress the dialog box on a qvw to qvw basis? We have a macro to export some data to a CSV file in the user’s MyDocuments folder, but if they chose the wrong option from the above dialog box they lose that functionality.


        • Posted March 29, 2011 at 19:03 | Permalink

          Yes, theres is a way to change the security settings: use Control+Shift+M to access the module security dialog.

          For all combination and dependencies of settings influencing the security dialog I’ll prepare an article with some details …


    • Posted March 29, 2011 at 19:01 | Permalink

      What’s just about using this script as a windows logon script with other security permissions than the current user; that’s really the purpose of this article.


      • Brian
        Posted April 18, 2012 at 19:26 | Permalink

        So does the .vbs need to be run on each client PC or is run on the QV server?

  7. Anne Duffy
    Posted February 28, 2012 at 17:30 | Permalink

    Hi Stefan

    In relation to the above I have a QV doc where there are 10 users with viewers licenses , when they open the doc the Macros will not run and they are getting a
    “Error ActiveX componentcant creat object : ‘Excel.Application'”

    However, the 2 developers on opening the macro runs no worries.

    When the viewers select ctrl+shift+M their macro level is set to “Limit module Script” , even if they check “Give system access…” the selection does not save.

    Is there a way of changing and saving this setting ? — They are not administrators of their PCs

    Any advice is greatly apreciated ?


  8. Posted July 12, 2012 at 11:54 | Permalink

    Hi Stefan,

    Thanks for the tip. In my environment, I don’t have control to change registry. Does this message prompt everytime the user starts the QV application? Or is it just for the first time?


  9. Posted August 10, 2012 at 17:52 | Permalink

    Oh my goodness! Incredible article dude! Thanks, However I am having difficulties with
    your RSS. I don’t know the reason why I can’t subscribe to it.
    Is there anybody getting similar RSS issues?
    Anyone who knows the answer will you kindly respond?


  10. Fabrizio
    Posted September 12, 2012 at 09:41 | Permalink

    Hi Stefan.

    I have two questions:

    a) Once the user has ticket “Always use this option for documents from this QlikView Server”, he will not be prompted again with the “Module Security for Document” popup. Supposing he did the wrong choice (Disable or Allow), is there a way to r-enable the popup window to prompt again the user?

    b) have you had the chance to write the article “For all combination and dependencies of settings influencing the security dialog” 29 March 2011?

    Thank you very much

  11. Guy
    Posted December 8, 2013 at 07:53 | Permalink

    Hi Stefan,

    I’ve tried this with QVS 11, desktop client 11.2 and although the directories in the registry has been created,
    the prompt is still appears.
    Is there any changes i have to do in the script for QV 11 ?



  12. Guy
    Posted December 17, 2013 at 10:25 | Permalink


    Can it work with ocx client ver. 9 ?
    If yes, what changes should i apply to vbs ?


  13. Posted January 4, 2014 at 04:11 | Permalink

    Hi everyone, it’s my first pay a visit at this website, and
    post is truly fruitful designed for me, keep up posting these content.