Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to know how to open a determinated sheet based of the column or expression I click in a pivot table. The expression can be a formula.
I´m using a macro
Sub openDetalle
ActiveDocument.Sheets("A").Activate
End sub
but I don´t know how to open the sheet based in the column I click
For example:
Hi, see attached qvw file.
The title is a vertical dimension, there are 2 macros, opensheet and openIntro.
The macro opensheet is executed when field title or filed index is selected. See Document properties
is it possibe?
It depends on if you have other selections or not. When you click on a field in a Pivot Table, it makes a selection.
To determine which item was clicked on in the pivot table, you would need to look at what selection was made. There are probably multiple ways to go about it, but comparing the current selection with a variable that held the previous selection would be how I would approach it.
The other problem is that selections made elsewhere in the document would also go through this same macro. There is no way to determine if the selection was made on the pivot table or somewhere else in the document. You could use a completely separate set of data and only use it on the pivot table, but that may get a little messy.
There really isn't a nice, easy way to do this, but if you really need that functionality, it can probably be done.
Everytime i click on in the pivot table, i obtain the same selection of year, week and day.
This is the reason i can´t to compare the current selection with the column I click.
I need to obtain the number of column tha i click and then open the sheet via macro
What version of QV?
Can you post a sample QVW?
-Rob
Hi Rob, i have solved my problem, how can i attach a qvw file with an example?
I can´t do it, i don´t find the button to attach files to this post
Click on "Quick Reply" then their is a film icon looking thing on the tool bar. Click it, it says media but includes qvw's
Also, if you're doing a regular reply, there are tabs at the top. Click the Options tab and you have the option to Attach a file.
Hi, see attached qvw file.
The title is a vertical dimension, there are 2 macros, opensheet and openIntro.
The macro opensheet is executed when field title or filed index is selected. See Document properties