Skip to main content Skip to complementary content

Accessing QlikView documents from the internal VBScript interpreter

When using the internal VBScript interpreter, the only reference available is the ActiveDocument special property of the class Application. All references must be made starting from that point.

Information noteThe ActiveDocument property from VBScript provides a reference to the QlikView document running the VBScript macro!

Examples

Example 1:  

rem ** VBScript Example 1 ** sub Clr set QVDoc = ActiveDocument QvDoc.ClearAll false end sub

Example 2:  

rem ** VBScript Example 2 ** sub a set up = ActiveDocument.GetApplication.GetUserPreferences Cp = up.ConfirmPurge if Cp=true then msgbox("Warning! No Reduce Data confirmation!") end if end sub

Example 3:  

rem ** VBScript Example 3 ** set doc1 = ActiveDocument rem ** ActiveDocument points at document running macro ** set App = doc1.GetApplication set newdoc = App.OpenDoc ("C:\MyDocuments\QV4_Automation.qvw","","") newdoc.Activate rem ** Note! newdoc is active but ActiveDocument points at doc1 **

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com