Does Mr Excel use version 2010 in video Episode 1211?

Mindy12

New Member
Joined
Oct 15, 2010
Messages
2
I am trying to run a macro for a pivot table in XL 2007 and keep getting errors (now it's syntax error: expected expression- at Tabledestination). I notice in video episode 1211 that Mr. Excel has version 14 in his code (mine says version12).

Is Mr. Excel getting Version14 because he uses XL 2010, and could this be why my code does not work when I copy the code used in this video?

error is occurring in the bold and underlined section of my code below.

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
DataSheet & "!R1C2:R" & FinalRow & "C10", Version:=xlPivotTableVersion12).CreatePivotTable_
TableDestination:=NewSheet & "!R1C1", TableName:="PivotTable3", DefaultVersion:=xlPivotTableVersion12


Thank you
Mindy
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Yes, Excel 2010 (version 14) is being used (the 'clue' it in the top-left of the screen where the Excel 2007 round button is now a green 'File' tab in Excel 2010).
My guess is that it may be the pivottablename (PivotTable3) that is causing the problem - if it already exists.
You could try (using a copy of your workbook) deleting the pivot table worksheet, closing and re-opening the workbook and then running the macro again.
 

Forum statistics

Threads
1,222,728
Messages
6,167,872
Members
452,151
Latest member
DolonG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top