Can you please elaborate your requirement... I would have use the binary statement for the purpose of integrating one qvw into another..
Or if you want open a diiferent qvw then we can rather make use of button and on it's click event we can open another qv application.. Hope this gives you an idea
thanks for your input.
The requirement is to have two applications with the same sheet structure. Application A has 8 sheets, but on of this sheet (e.g. "Special") should be outsourced into another application due to its complexity and data input. Application B has therefore one one real sheet, but the other 7 sheets will be displayed to ensure consistency. If the users clicks in Application A on Sheet "Special", Application B should be opened and this sheet be activated. If I click however in Application B on any of the other sheets, Application A should be opened again and it should jump to the selected sheet.
I was able to find a solution by myself.
Beside the "Click a button"-Macro to evade the Sheet Actions Issue I am using the Transfer State functionality.
I created an Inline Load with all possible sheets in both applications. If the user clicks on a specific sheet from Application B, he will also select the SheetID of this specific sheet. After that Application A will be opened, the Sheet ID passed and a macro started which will Activate the selected SheetID.
Usally it would be easier to just use an OnOpenDocument-Trigger to jump to the correct sheet, but unfortunately the passing of the selection state happens after this action and the correct sheet wont be activated. A macro however happens to be after the passing of the selection states.
Sorry if this problem sounds more complicated than it actually is, but QlikView gave me no choice.
Safe Mode is enough for this kind of macro. In fact I had to use the "Press" macro in both applications, since this way should work two-way.
But the Main Application uses additionally the following macro.
On Error Resume Next
Sheet = ActiveDocument.Fields("Sheet").GetSelectedValues.Item(0).text
ActiveDocument.Fields ("Sheet").Select ""
So far the solution works as expected and the users does not see much of a difference.
Hmm, yes, I think I mostly understand how your solution works. I had slightly different plan where I would have a sort of menu document where the user could click one of the buttons and then correct document and sheet would open. So I wouldn't have the same set of sheets in every document.
How do you start the macro on the target document? You are using the ActiveDocument in the macro, so I guess that macro is run on the target document after the document change has finished, or how does it work? Even if I put the execute macro action after the document change, it still runs it so that the ActiveDocument references to the source document, not the target one. The reason why I was asking about the macro security was that I thought I had to use GetObject() to be able to manipulate the target document.