4 Replies Latest reply: Jun 19, 2012 12:18 PM by Mark Orchard RSS

    API in VB

    Mark Orchard

      HI

       

      Can anyone advise how to make selections using API via VB? 

       

      To date I have the below to open a file, refresh it, select the LIstbox i want to make the selection in but i cant get the IArrayOfRect Add methdo to work??  I can get it to Select all but i would like to eb able to specify a single select.

       

             

      Dim QvApp As New QlikView.Application

           

      Dim QVDoc As New QlikView.Document

       

      QVDoc = QvApp.OpenDoc("C:\pgrp.qvw")

      QVDoc.ReloadEx()


      Dim sel As QlikView.ListBox

       

      sel = QVDoc.GetSheetObject("LB02")

      Dim pband As QlikView.IArrayOfRect

       

      pband.Add("M")

       

      sel.GeneralSelect(pband)

      sel.SendToExcel()


      QVDoc.CloseDoc()


      QvApp.Quit()

       

      Cheers

       

      Mark