methode2404
New Member
- Joined
- Sep 3, 2018
- Messages
- 30
Hi team,
I have to filter more than 100 items to olap cube. I can't it manually, can i do this with vba ?
the items are in a row (Q2:Q150)
I want that vba add it to olap cube filter.
I found a code, but doesn't work.
sub test()
Dim MyArray as variant
Dim rcnt as Integer
rcnt = Range(Rnage("Q2"), Range ("Q1000").End(xlUp)).count
MyArray = Range("Q2:Q & rcnt & ").value
Activeworkbook.Sheets("xxx").pivottables("Pivottable1").pivotfields(_
"[Stoklar].[Stock.kodu].[Stok.kodu]").visibleItemslist = MyArray
End Sub
Is that possible with vba ?
Thanks & Regards
I have to filter more than 100 items to olap cube. I can't it manually, can i do this with vba ?
the items are in a row (Q2:Q150)
I want that vba add it to olap cube filter.
I found a code, but doesn't work.
sub test()
Dim MyArray as variant
Dim rcnt as Integer
rcnt = Range(Rnage("Q2"), Range ("Q1000").End(xlUp)).count
MyArray = Range("Q2:Q & rcnt & ").value
Activeworkbook.Sheets("xxx").pivottables("Pivottable1").pivotfields(_
"[Stoklar].[Stock.kodu].[Stok.kodu]").visibleItemslist = MyArray
End Sub
Is that possible with vba ?
Thanks & Regards