Invalid Procedure Call or Argument - Run-time error '5'

A

Andrew

Hello All,

A co-worker's is getting the following error, Run-time error '5' Invalid
Procedure Call or Argument when she executes the code below. When I run it
there is not error. We both have the same version of Excel and the same OS.

Does anyone have any idea why this is happening???

Sub crtHndouts()

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'CM02 Data'!A:AG").createPivotTable TableDestination:= _
"'[CM02 -Report.xls]Reports'!R10C1", TableName:="Data", _
DefaultVersion:=xlPivotTableVersion10
.........

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top