Skip to main content

Untyped VB with QlikView Automation

ON THIS PAGE

Untyped VB with QlikView Automation

Although typed references is quite convenient to work with and also creates faster code, it is sometimes desirable to use untyped code from VB (VBScript code is always untyped). The main reason is often to avoid the need for recompiling the VB code when the type library changes e.g. as the result of updated QlikView versions.

In order to achieve untyped code follow the steps below:

  1. Do not include the QlikView type library in your project.
  2. Use the code shown below to get hold of QlikView.
  3. Do not use any statements such as dim … as QlikView.xxx.

Example

Note: The following example does not work in VBScript!
Private Sub UntypedCall() rem ** Create an untyped reference from VB ** set Qv = CreateObject("QlikTech.QlikView") set ActiveDoc = Qv.ActiveDocument rem ** ActiveDoc can now be used largely as the ** rem ** ActiveDocument reference in VBScript ** … End Sub