I m a newbie to vba and need your help: I managed to create a code which opens a different excel file called "test" when making a double click in any cell of column H. So far so good.

In the file "test" there is a pivot table and I want to set the filter there with the respective value of the first file's C column where I made the double click on the H column. For example, if I make a double click on H30, I want to copy the value of C30, if I double click on H50, I want to copy the value of C50 and insert it as a new filter in the pivot table of the "test" file. Therefore I created the "test" macro. Hope that makes sense lol.

That is my current code, which always takes the C24 value and inserts it in the filter.

Many thanks guys!

```
Sub test()
'
' test Makro
'

'
    Range("C24").Select
    Selection.Copy
    Windows("test.xlsx").Activate
    ActiveSheet.PivotTables("PivotTable3").PivotFields( _
        "[Abfrage].[D_JL_NR].[D_JL_NR]").VisibleItemsList = Array( _
        "[Abfrage].[D_JL_NR].&[15109]")
    Windows("test.xlsx").Activate
End Sub

```