Hello all,
can somebody explain to me how is posibble following situation:
When I use this VBA on my private computer is working as charm
but when I used this exactly same VBA in Sharepoint folder, suddenly it is not working at all.
I got this error:
Run-time error '9':
Subscrpit out of range
Only reason what I can think of... I need somehow define to variable for CubeFields. Am I right? Or is there something more to this issue?
I will be gratefull for your help
can somebody explain to me how is posibble following situation:
VBA Code:
Sub Top10filter()
Dim pt As PivotTable
Dim Field As PivotField
Set pt = Worksheets("Kalkulácie").PivotTables("TOP")
Set Field = pt.PivotFields("[sumarizácia].[Celé meno].[Celé meno]")
Set Sh = Sheets("Kalkulácie")
Field.ClearAllFilters
Field.PivotFilters.Add2 Type:=xlTopCount, _
DataField:=Sh.PivotTables("TOP").CubeFields( _
"[Measures].[Súčet Prac. dni mimo práce]"), Value1:=Sh.Range("C1").Value
End Sub
When I use this VBA on my private computer is working as charm
but when I used this exactly same VBA in Sharepoint folder, suddenly it is not working at all.
I got this error:
Run-time error '9':
Subscrpit out of range
Only reason what I can think of... I need somehow define to variable for CubeFields. Am I right? Or is there something more to this issue?
I will be gratefull for your help