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:
- Do not include the QlikView type library in your project.
- Use the code shown below to get hold of QlikView.
- Do not use any statements such as dim … as QlikView.xxx.
Example
Information noteThe 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