Hello all,
I created a macro that creates a pivot table based on a dynamic range, in order to generate a report.
When I run it in my computer, everything goes ok, however, when I run it in someother computers, the follow error message appears:
Run-time error '5':
Invalid procedure call or argument
When I debug, I can see the problem lies in this code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Dados!A1:AU" & nlinhas, Version:=6).CreatePivotTable TableDestination:= _
"Report_DR!R11C1", TableName:="PivotTable1", DefaultVersion:=6
I already changed some excel options related with Trust Center, however the problem persists.
What can I do?
Thank you.
I created a macro that creates a pivot table based on a dynamic range, in order to generate a report.
When I run it in my computer, everything goes ok, however, when I run it in someother computers, the follow error message appears:
Run-time error '5':
Invalid procedure call or argument
When I debug, I can see the problem lies in this code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Dados!A1:AU" & nlinhas, Version:=6).CreatePivotTable TableDestination:= _
"Report_DR!R11C1", TableName:="PivotTable1", DefaultVersion:=6
I already changed some excel options related with Trust Center, however the problem persists.
What can I do?
Thank you.