Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like a macro which will hide and unhide sheets. I will attached the macro to a button.
Thanks
1. In your docuument, define a variable named "vShowSheet" and assign it a value of "1".
2. On the properties General tab for the sheet(s) you want hide, in the Show Sheet section:
- check Conditional
- Enter "vShowSheet" for the Condition (without the quotes).
3. If you are using V9+, assign Action to the button:
Action: Set Variable
Variable: vShowSheet
Value: =(vShowSheet-1)*-1
That Value expression will toggle the variable value between 0 and 1.
3 If you are using V8, define a macro like this:
Sub ToggleShow
ActiveDocument.GetVariable("vShowSheet").SetContent ActiveDocument.Evaluate("(vShowSheet-1)*-1"), true
End Sub
Then assign the macro ToggleShow to your button.
-Rob
1. In your docuument, define a variable named "vShowSheet" and assign it a value of "1".
2. On the properties General tab for the sheet(s) you want hide, in the Show Sheet section:
- check Conditional
- Enter "vShowSheet" for the Condition (without the quotes).
3. If you are using V9+, assign Action to the button:
Action: Set Variable
Variable: vShowSheet
Value: =(vShowSheet-1)*-1
That Value expression will toggle the variable value between 0 and 1.
3 If you are using V8, define a macro like this:
Sub ToggleShow
ActiveDocument.GetVariable("vShowSheet").SetContent ActiveDocument.Evaluate("(vShowSheet-1)*-1"), true
End Sub
Then assign the macro ToggleShow to your button.
-Rob
Hi Rob,
how can i make , not having connections between one sheet to another sheet. Here in two sheets i am using same objects and expressions. If i am changing any positions or values of particular object, it should not get effected with another sheet.
First Sheet is "G1" contains slider and barchart based on slider movements the barchart changes.
Second Sheet is "G2" contains the same objects , slider and barchart based on slider movements the barchart changes.
Now my requirement is when i am working with "G1" and making changes that should not be effect to "G2". Totally i don't want any relationship between this two sheets.
Can you help in this query.
Thnks
Hi Rob
I am trying to put a button on my QV9 document that shows and selects a sheet ( otherwise the sheet is hidden) and then hides it .
I have put the following
In the script I have put the following,
SET
vShowSheet = 1;(I have also tried Let vShowSheet = 1)
then on the sheet I wish the action to happen on, set Show sheet to conditional and put the condition as
vShowSheet
On the button I have selected tab Actions>Set variable and Variable as
vShowSheet and condition as
=(vShowSheet-1)*-1This does not seem to be working as when I click the button nothing happens ,
Can you please help me ?
Thanks
A
You should not have parens in
=(vShowSheet-1)*-1
it should be:
=vShowSheet-1*-1
An even easier way to toggle the variable is:
=NOT vShowSheet
-Rob
So you want selections to be independent on each sheet? See http://community.qlik.com/message/102195#102195
Hi Rob
Thanks a mill it works perfect
Kind regards
Anne