Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

hide and show tab

Can somebody please tell me how to hide and show a tab using a button click[*-)]

Tags (2)
4 Replies
Not applicable

hide and show tab

1. You have to make a button.

2. Click properties - in function mrak MAcro. I next tab write a macro by editing.

3. Exmaple o f Macro


Sub show
set y = ActiveDocument.Variables("Marketing")
y.SetContent "0", true
end sub

sub market
set y = ActiveDocument.Variables("Marketing")
if y.GetContent.String="1" then
ActiveDocument.Variables("Marketing").SetContent "0",true
set button1 = ActiveDocument.getsheetobject("BU63")
set prop = button1.GetProperties
prop.Text.v = "Pokaz analizy marketingowe"
button1.SetProperties prop
else
ActiveDocument.Variables("Marketing").SetContent "1",true
set button1 = ActiveDocument.getsheetobject("BU63")
set prop = button1.GetProperties
prop.Text.v = "Ukryj analizy marketingowe"
button1.SetProperties prop
end if
end sub


4. In sheets you want to hide/show by macro in properties in Show Sheet write in this example - in conditional:

Marketing = 1

It shuold now works

Not applicable

hide and show tab

Thanx a lot.

it's working now

hide and show tab

Hi,

A very similar solution I use is as follows. First, I create all tabs with their objects and I click "Show Sheet" if vVisible='value'. I use a inline table of values for vVisible for each tab I want to show/hide. When clicking the button, I execute a macro kind of

Sub ShowSheet1
ActiveDocument.Fields("vVariable").Select "Sheet1"
ActiveDocument.Sheets("SH02").Activate //Sheet ID
End Sub


In the hidden tab, the "Close" button would be very similar to

Sub CloseSheet1
ActiveDocument.Fields("vVariable").Clear
ActiveDocument.Sheets("SH01").Activate //Sheet ID for Main Tab
End Sub


Regards.


Not applicable

hide and show tab

Hello,

On my case, I only check the 'Hide tab' option at 'Documents Properties'. Then, a created a button for each tab to execute a macro for each tab too.

A created one macro for each tab like this:

Sub ShowSheet1
ActiveDocument.Sheets("SH10").Activate //Sheet ID
End Sub

bye