ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro error when shared (https://www.excelbanter.com/excel-programming/351663-macro-error-when-shared.html)

Monish

macro error when shared
 
I have a macro-driven workbook which I sent to a client, but when she tries
to run it she gets an error in the initial portion of the macro (as shown
below)...I'm not sure if this is enough info to understand the issue or not.

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"TendercardReport!R1C1:R100C49").CreatePivotTa ble
TableDestination:="", _
TableName:="PivotTable10", DefaultVersion:=xlPivotTableVersion10

The macro runs a pivot table from a table of data and then transposes the
vales into another output table.

Appreciate any help or thoughts...

M

JakeyC

macro error when shared
 
Make sure that the SourceData and TableDestination arguments are
correct - if the Workbook has been renamed it will cause errors here.


Monish

macro error when shared
 
Thanks for the response first of all.

The error is in fact a "Compile Error, Named Argument Not Found"

And it highlights Default Version in the portion of code below:

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"TendercardReport!R1C1:R100C49").CreatePivotTa ble
TableDestination:="", _
TableName:="PivotTable10", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)

Any help again would be much appreciated.

M

"JakeyC" wrote:

Make sure that the SourceData and TableDestination arguments are
correct - if the Workbook has been renamed it will cause errors here.



Mark Lincoln

macro error when shared
 
Just to hazard a guess: Is your client running an earlier version of
Excel?


Monish

macro error when shared
 
She is...I wasn't sure how to accommodate that...is there anything I should
have/ can do?

M

"Mark Lincoln" wrote:

Just to hazard a guess: Is your client running an earlier version of
Excel?




All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com