Thread: Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mat P:son[_2_] Mat P:son[_2_] is offline
external usenet poster
 
Posts: 97
Default Macro

1) Split the one-liner into several separate bits, and check where the error
occurs
2) Spend a few minutes reading the Excel VBA manual

/MP

"Nbiggss" wrote:

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"'" & Activehseet.Name & "'!R21C2:R65536C8").CreatePivotTable
TableDestination:="", _TableName:="PivotTable2"

Error: Argument not optional.

I think this comes from the last section of the above TableDestination:=""

Help