R
Ruben
Hello,
I have a problem with making a pivottable from my data with visual basic.
When running the code visual basic says that there is an invalid procedure
call or an invalid argument. The part of the code that is wrong according to
visual basic is the uppermost part(from beginning till
'xlpivottableversion10'):
Sub CreatingPivottable
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Bewerkte data'!R1C1:R10000C18").CreatePivotTable
TableDestination:= _
"Blad1!R3C1", TableName:="Draaitabel8", DefaultVersion:= _
xlPivotTableVersion10
'....(other part of code)...
End Sub
'Bewerkte data' is the name of the sheet with the data that is used for
making the pivottable and 'blad1' is the name of the sheet where the
pivottable has to be placed (this sheet exists before I start the code).
'Draaitabel8' is the name of the pivottable. I start the code with a button
on the sheet 'Bewerkte data'.
I hope the problem is clear, if it is not let me know. It would be great if
someone could help me!
Ruben
I have a problem with making a pivottable from my data with visual basic.
When running the code visual basic says that there is an invalid procedure
call or an invalid argument. The part of the code that is wrong according to
visual basic is the uppermost part(from beginning till
'xlpivottableversion10'):
Sub CreatingPivottable
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Bewerkte data'!R1C1:R10000C18").CreatePivotTable
TableDestination:= _
"Blad1!R3C1", TableName:="Draaitabel8", DefaultVersion:= _
xlPivotTableVersion10
'....(other part of code)...
End Sub
'Bewerkte data' is the name of the sheet with the data that is used for
making the pivottable and 'blad1' is the name of the sheet where the
pivottable has to be placed (this sheet exists before I start the code).
'Draaitabel8' is the name of the pivottable. I start the code with a button
on the sheet 'Bewerkte data'.
I hope the problem is clear, if it is not let me know. It would be great if
someone could help me!
Ruben