Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Urgent: Activate Specific Tab - Macro Trigger

Hi everyone,

I would like to assign a macro to a tab. On clicking this tab the macro would open a new qlikview document specified in the path mentioned. Find below
the macro that i am assigning to the tab.


Sub OpenHome

    set App=ActiveDocument.GetApplication

    App.OpenDoc "Path\Filename.qvw","",""

End Sub

The new document has several tabs. My requirement is to activate a specific tab in that new document. Not sure how this can be done?

Any ideas?

Tkx.
Harsha

1 Solution

Accepted Solutions
Not applicable
Author

Check of the attachement. Once unzipped you would find two files, HomeDoc and TargetDoc. Demonstrated opening TargetDoc from HomeDoc and dynamically activating the sheet.

OpenDoc:

Has a variable which tells which sheet in TargetDoc to open.

Two button set the variable and runs a macro.

Macro reads the variable, opens TargetDoc and activates the sheet specified in the variable.

Hope this demonstrates your requirement.

Regards,

Kiran.

View solution in original post

8 Replies
Not applicable
Author

In the second document: Go to Document Properties->Triggers->On Open and add action Layout->Activate Sheet.

If you want to do this dynamically, you can a set variable value in App.OpenDoc and use that to activate sheet.

Hope this helps,

Kiran

Not applicable
Author

Hi Kiran,

I would like to have it dynamic, Can you please share an example how i can do this in the macro?

Tkx.

Harsha

Not applicable
Author

Check of the attachement. Once unzipped you would find two files, HomeDoc and TargetDoc. Demonstrated opening TargetDoc from HomeDoc and dynamically activating the sheet.

OpenDoc:

Has a variable which tells which sheet in TargetDoc to open.

Two button set the variable and runs a macro.

Macro reads the variable, opens TargetDoc and activates the sheet specified in the variable.

Hope this demonstrates your requirement.

Regards,

Kiran.

Not applicable
Author

Works Perfectly....Thanks a lot Kiran

- Harsha

rotmangadi
Partner - Contributor III
Partner - Contributor III

It was very helpful for me as well,

Thanks!

Anonymous
Not applicable
Author

Hi Kiran, I have a question.

Why if you put in mode webview, the macro dont  work, please help me.

Regards.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

The ActiveSheet Trigger doesn't work in WebView.

Try using a button instead.

Anonymous
Not applicable
Author

Dear Kiran,

My question is, I want to open Word documents in a OpenFiles.qvw,

and  I created a button that when selecting the button open the word document.

 

What I did was 

Actions tab launch  add action and I gave the path where the archivo.qvw was stored

😧 \ QlikView \ Production \ Documents \ Transaction \ User.docx

attached print 1.

Everything works fine, but when I publish the Access Point does not worke and I can't open word documents.

Regards,print1.JPG