6 Replies Latest reply: Dec 22, 2015 5:47 AM by Ant�nio Vilares RSS

    Qlikview Desktop 11.2 - Run a QVW inside another QVW

    Ant�nio Vilares

      Hello People,

      I want to re-load another QVW when I open my current QVW. To do it, I am using a Macro but I’ve some erros when execute it.

      Imagine that my directory is XX

      And my file is YY.

       

      My code is the following:


      sub Run_ETL



      ActiveDocument.Reload



      set App = ActiveDocument.GetApplication


      set QVDocs=ActiveDocument.Fields
      (XX).GetPossibleValues

      for i = 0 To QVDocs.Count - 1

      myDocName=QVDocs.Item(i).Text
      ActiveDocument.Fields("
      XX").Select(myDocName)

      set FromDirectoryL=ActiveDocument.Fields("
      XX").GetPossibleValues
      FromDirectoryLoc=FromDirectoryL.Item(0).Text

      ActiveDocument.Fields("
      YY").Clear

      Set Doc = App.OpenDoc(FromDirectoryLoc & myDocName )

      Doc.Reload
      Doc.Save

      ActiveDocument.Activate
      Doc.CloseDoc

      Next


      End Sub

       

      What is wrong?

      Thank you!